public IConnection NewConnection(INode localEndpoint, INode remoteEndpoint) { var connection = CreateConnection(localEndpoint, remoteEndpoint); connection.Configure(Config); if (ReceivedData != null) { connection.Receive += (ReceivedDataCallback)ReceivedData.Clone(); } if (ConnectionEstablishedCallback != null) { connection.OnConnection += (ConnectionEstablishedCallback)ConnectionEstablishedCallback.Clone(); } if (ConnectionTerminatedCallback != null) { connection.OnDisconnection += (ConnectionTerminatedCallback)ConnectionTerminatedCallback.Clone(); } if (ExceptionCallback != null) { connection.OnError += (ExceptionCallback)ExceptionCallback.Clone(); } return(connection); }
public IReactor NewReactor(INode listenAddress) { var reactor = NewReactorInternal(listenAddress); reactor.Configure(Config); if (ReceivedData != null) { reactor.OnReceive += (ReceivedDataCallback)ReceivedData.Clone(); } if (ConnectionEstablishedCallback != null) { reactor.OnConnection += (ConnectionEstablishedCallback)ConnectionEstablishedCallback.Clone(); } if (ConnectionTerminatedCallback != null) { reactor.OnDisconnection += (ConnectionTerminatedCallback)ConnectionTerminatedCallback.Clone(); } if (ExceptionCallback != null) { reactor.OnError += (ExceptionCallback)ExceptionCallback.Clone(); } return(reactor); }
public new ClientBootstrap OnDisconnect(ConnectionTerminatedCallback connectionTerminatedCallback) { base.OnDisconnect(connectionTerminatedCallback); return(this); }
public new ClientBootstrap OnDisconnect(ConnectionTerminatedCallback connectionTerminatedCallback) { base.OnDisconnect(connectionTerminatedCallback); return this; }
public virtual AbstractBootstrap OnDisconnect(ConnectionTerminatedCallback connectionTerminatedCallback) { ConnectionTerminatedCallback = connectionTerminatedCallback; return(this); }
public virtual AbstractBootstrap OnDisconnect(ConnectionTerminatedCallback connectionTerminatedCallback) { ConnectionTerminatedCallback = connectionTerminatedCallback; return this; }