Rework stream socket
Stream socket on server now uses the same port as the control socket. Client does not assign a port to its stream socket, instead it sends a handshake packet at the beginning, the server reads the remote port from it.
This commit is contained in:
+2
-2
@@ -195,9 +195,9 @@ int inner_main(int argc, char * argv[])
|
||||
{
|
||||
try
|
||||
{
|
||||
avahi_publisher publisher(hostname().c_str(), "_wivrn._tcp", control_port);
|
||||
avahi_publisher publisher(hostname().c_str(), "_wivrn._tcp", default_port);
|
||||
|
||||
TCPListener listener(control_port);
|
||||
TCPListener listener(default_port);
|
||||
bool client_connected = false;
|
||||
bool sigint_received = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user