|
reSIProcate/stack
9694
|
#include <sys/time.h>#include <unistd.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <sys/types.h>#include <iostream>#include <memory>#include "resip/stack/Helper.hxx"#include "resip/stack/SipMessage.hxx"#include "resip/stack/Uri.hxx"#include "resip/stack/SipStack.hxx"#include "resip/stack/DeprecatedDialog.hxx"#include "rutil/Logger.hxx"#include "rutil/ThreadIf.hxx"
Go to the source code of this file.
Classes | |
| class | Client |
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Functions | |
| int | main (int argc, char *argv[]) |
| #define RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Definition at line 24 of file testClient.cxx.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 94 of file testClient.cxx.
References resip::Log::Cout, resip::SipStack::getHostname(), resip::Uri::host(), resip::Log::initialize(), resip::isEqualNoCase(), resip::ParserCategory::param(), resip::Uri::port(), Client::process(), resip::TCP, resip::Log::toLevel(), resip::UDP, resip::NameAddr::uri(), and resip::Uri::user().
{
if (argc != 3)
{
cerr << argv[0] << " LOG_LEVEL TARGET_URI" << endl;
exit(-1);
}
Log::initialize(Log::Cout, Log::toLevel(argv[1]), argv[0]);
NameAddr target(argv[2]);
NameAddr contact;
contact.uri().host() = SipStack::getHostname();
contact.uri().port() = 5080;
contact.uri().user() = "yffulf";
TransportType protocol;
if (isEqualNoCase(target.uri().param(p_transport), "UDP"))
{
protocol = UDP;
}
else if (isEqualNoCase(target.uri().param(p_transport), "TCP"))
{
protocol = TCP;
}
else
{
cerr << argv[0] << " LOG_LEVEL TARGET_URI(must include transport parameter)" << endl;
exit(-1);
}
Client c(protocol, contact, target);
while (true)
{
c.process(0);
}
}

1.7.5.1