private void IsChannelReady() { if (mRpcController.Channel != null && mRpcController.Channel.IsReady) { return; } try { mTcpClient = new TcpClient(mUrl, Settings.Port) { SendTimeout = 3000 }; mRpcChannel = new TcpClientRpcChannel(mRpcController, mTcpClient, Timeout.Infinite)//, "client") { OnError = () => { Console.WriteLine("-- client f**k"); if (mTcpClient != null) { mTcpClient.Close(); } if (OnError != null) { OnError(); } } }; mRpcChannel.Start(); } catch (SocketException) {} }
public Server(ClusterConfiguration clusterConfiguration) { _currentStatus = new UninitializedStatus(this); _statusFactory = new StatusFactory(); // todo avoid hard-coded timespan _rpcChannel = new NetMqRpcChannel(clusterConfiguration, TimeSpan.FromMilliseconds(200)); }
public NamedPipeTransportChannel(RpcChannel <NamedPipeTransportChannel> channel, PipeStream pipeStream) { Channel = channel ?? throw new ArgumentNullException(nameof(channel)); _pipeStream = pipeStream ?? throw new ArgumentNullException(nameof(pipeStream)); }
public TcpTransportChannel(RpcChannel <TcpTransportChannel> channel, TcpClient client) { Channel = channel ?? throw new ArgumentNullException(nameof(channel)); Client = client ?? throw new System.ArgumentNullException(nameof(client)); }