private void _socket_ConnectionReceived(Socket newSocket) { var socketConnection = new NKC_SocketTCP(newSocket, this); connections.Add(socketConnection); _emitConnection(socketConnection); socketConnection._receiveData(); }
private void _socket_ConnectionReceived(StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args) { var socketConnection = new NKC_SocketTCP(args.Socket, this); connections.Add(socketConnection); // args.Socket.setDelegate(socketConnection, delegateQueue: NKScriptChannel.defaultQueue _emitConnection(socketConnection); var _ = socketConnection._receiveData(); }