public Protocol(PomeloClient pc, System.Net.Sockets.Socket socket) { this.pc = pc; this.transporter = new Transporter (socket, this.processMessage); this.handshake = new HandShakeService(this); this.state = ProtocolState.start; }
public Protocol(PomeloClient pc, Socket socket) { this.pc = pc; this.transporter = new Transporter(socket, new Action <byte[]>(this.processMessage)); this.handshake = new HandShakeService(this); this.state = ProtocolState.start; }
public Protocol(PomeloClient pc, System.Net.Sockets.Socket socket) { this.pc = pc; this.transporter = new Transporter(socket, this.ProcessMessage); this.transporter.onDisconnect = this.OnDisconnect; this.handshake = new HandShakeService(this); this.state = ProtocolState.start; }
public Protocol(Connection pc, System.Net.Sockets.Socket socket) { this._pomeloClient = pc; this._transporter = new Transporter(socket, this.processMessage); this._transporter.onDisconnect = onDisconnect; this._handshake = new HandShakeService(this); this._state = ProtocolState.start; }
public Protocol(ITransporter transproter, Action <Message> messageProcessor, Action onProtoClose) { this.transporter = transproter; this.transporter.onReceive(this.processMessage); this.onProtocolClose += onProtoClose; this.messageProcessor += messageProcessor; this.handshake = new HandShakeService(this); this.state = ProtocolState.ready; }
public Protocol(PomeloClient pc, TransporterBase inTransporter) { this.pc = pc; this.transporter = inTransporter; this.transporter.SetMessageProcesser(this.processMessage); this.transporter.onDisconnect = onDisconnect; this.handshake = new HandShakeService(this); this.state = ProtocolState.start; }