public void setSocket(Socket value) { lock (addr) { this.socket = value; if (this.socketFactory != null) { if (this.socket != null) { //this.socketFactory.ReaderStorage.addTransport(this); this.socketFactory.WriterStorage.addAliveReqInspection(this); messageCoder = socketFactory.getTransportFactory().TransportMessageCoderFactory.newCoder(this); this.socket.BeginReceive( tempReceiveBuffer.Value, 0, tempReceiveBuffer.Value.Length, SocketFlags.None, new AsyncCallback(this.receiveAsync), this.socket ); } else { //this.socketFactory.ReaderStorage.removeTransport(this); this.socketFactory.WriterStorage.delAliveReqInspection(this); } } } }
public void setSocket(Socket value) { lock (addr) { this.socket = value; if (this.socketFactory != null) { if (this.socket != null) { //this.socketFactory.ReaderStorage.addTransport(this); this.socketFactory.WriterStorage.addAliveReqInspection(this); messageCoder = socketFactory.getTransportFactory().TransportMessageCoderFactory.newCoder(this); this.socket.BeginReceive( tempReceiveBuffer.Value, 0, tempReceiveBuffer.Value.Length, SocketFlags.None, new AsyncCallback(this.receiveAsync), this.socket ); } else { //this.socketFactory.ReaderStorage.removeTransport(this); this.socketFactory.WriterStorage.delAliveReqInspection(this); } } } }