|
reSIProcate/stack
9694
|
#include "resip/stack/SipStack.hxx"#include "resip/stack/Transport.hxx"#include "resip/stack/Uri.hxx"#include "resip/stack/Helper.hxx"#include "resip/stack/UdpTransport.hxx"#include "rutil/Logger.hxx"#include "rutil/DataStream.hxx"#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>
Go to the source code of this file.
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::APP |
| #define | CRLF "\r\n" |
Functions | |
| void | doit (int serverResponse, int expectedRetrans, int expectedClientResponse) |
| int | main (int argc, char *argv[]) |
Variables | |
| SipStack * | client = 0 |
| Fifo< Message > | received |
| UdpTransport * | server = 0 |
| #define CRLF "\r\n" |
Definition at line 19 of file testNonInviteServerTx.cxx.
| #define RESIPROCATE_SUBSYSTEM Subsystem::APP |
Definition at line 18 of file testNonInviteServerTx.cxx.
| void doit | ( | int | serverResponse, |
| int | expectedRetrans, | ||
| int | expectedClientResponse | ||
| ) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 31 of file testNonInviteServerTx.cxx.
References resip::SipStack::addTransport(), client, resip::Log::Cout, resip::Log::Debug, doit(), InfoLog, resip::Log::initialize(), received, server, and resip::UDP.
{
Log::initialize(Log::Cout, Log::Debug, argv[0]);
InfoLog( << "Starting up, making stack");
client = new SipStack();
client->addTransport(UDP, 5060);
server = new UdpTransport("localhost", 5070, "default", received);
// Test 1:
// client sends a reg, server does nothing, client should retransmit 10
// times, client should receive 408
// Test 2:
// client sends a reg, server sends 100, client should retransmit 7 times
// client should receive 408
// Test 3:
// client sends a reg, server sends 200, client shouldn't retransmit at all
// client should receive 200
// Test 4:
// client sends a reg, server sends 400, client shouldn't retransmit at all
// client should receive 400
//doit(100, 7, 408);
doit(200, 1, 200);
doit(400, 1, 400);
doit(0, 10, 408);
return 0;
}

Definition at line 22 of file testNonInviteServerTx.cxx.
Definition at line 23 of file testNonInviteServerTx.cxx.
| UdpTransport* server = 0 |
Definition at line 24 of file testNonInviteServerTx.cxx.
Referenced by main().
1.7.5.1