public __TcpListener(IPAddress localaddr, int port) { this.localaddr = (__IPAddress)(object)localaddr; this.port = port; try { // http://stackoverflow.com/questions/6090891/what-is-socket-bind-and-how-to-bind-an-address this.InternalSocket = new global::java.net.ServerSocket(); } catch { throw; } this.Server = (Socket)(object)new __Socket { InternalServerSocket = this.InternalSocket }; }
public __TcpListener(IPAddress localaddr, int port) { this.localaddr = (__IPAddress)(object)localaddr; this.port = port; try { // http://stackoverflow.com/questions/6090891/what-is-socket-bind-and-how-to-bind-an-address this.InternalSocket = new global::java.net.ServerSocket(); } catch { throw; } this.Server = (Socket)(object)new __Socket { InternalServerSocket = this.InternalSocket }; }
public void Stop() { try { this.InternalSocket.close(); this.InternalSocket = null; } catch { throw; } }