mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-14 10:55:42 +00:00
Add -j option to bind to specific address
Before this patch, the binding of the listening sockets was hardcoded to a local IP. Change-Id: I9ba184a1251c823e413a9230943ed263e52142ec
This commit is contained in:
@@ -37,7 +37,7 @@ static const int gNumToSend = 10;
|
||||
|
||||
void *testReaderIP(void *)
|
||||
{
|
||||
UDPSocket readSocket(5934, "localhost", 5061);
|
||||
UDPSocket readSocket("127.0.0.1", 5934, "localhost", 5061);
|
||||
readSocket.nonblocking();
|
||||
int rc = 0;
|
||||
while (rc<gNumToSend) {
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char * argv[] )
|
||||
Thread readerThreadUnix;
|
||||
readerThreadUnix.start(testReaderUnix,NULL);
|
||||
|
||||
UDPSocket socket1(5061, "127.0.0.1",5934);
|
||||
UDPSocket socket1("127.0.0.1", 5061, "127.0.0.1", 5934);
|
||||
UDDSocket socket1U("testSource","testDestination");
|
||||
|
||||
COUT("socket1: " << socket1.port());
|
||||
|
||||
Reference in New Issue
Block a user