public void StartListening(object data) { #if TARGET_JVM stopped = false; #endif listener = new TcpListener(bindAddress, port); if (server_thread == null) { threadPool = RemotingThreadPool.GetSharedPool(); listener.Start(); if (port == 0) { port = ((IPEndPoint)listener.LocalEndpoint).Port; } string[] uris = new String [1]; uris = new String [1]; uris [0] = GetChannelUri(); channel_data.ChannelUris = uris; server_thread = new Thread(new ThreadStart(WaitForConnections)); server_thread.IsBackground = true; server_thread.Start(); } }
public void StartListening(object data) { #if TARGET_JVM stopped = false; #endif listener = new TcpListener (bindAddress, port); if (server_thread == null) { threadPool = RemotingThreadPool.GetSharedPool (); listener.Start (); if (port == 0) port = ((IPEndPoint)listener.LocalEndpoint).Port; string[] uris = new String [1]; uris = new String [1]; uris [0] = GetChannelUri (); channel_data.ChannelUris = uris; server_thread = new Thread (new ThreadStart (WaitForConnections)); server_thread.IsBackground = true; server_thread.Start (); } }