public static RpcClient CreateTcp( EndPoint remoteEndPoint, ClientEventLoop eventLoop, RpcClientOptions options ) { RpcTransportException failure = null; var transport = new TcpClientTransport( remoteEndPoint, options.ForceIPv4.GetValueOrDefault() ? RpcTransportProtocol.TcpIpV4 : RpcTransportProtocol.TcpIp, eventLoop, options ); if ( failure != null ) { throw failure; } return new RpcClient( transport ); }
public static RpcClient CreateUdp( EndPoint remoteEndPoint, ClientEventLoop eventLoop, RpcClientOptions options ) { var transport = new UdpClientTransport( ClientServices.SocketFactory( ( options.ForceIPv4.GetValueOrDefault() ? RpcTransportProtocol.UdpIpV4 : RpcTransportProtocol.UdpIp ).CreateSocket() ), remoteEndPoint, eventLoop, options ); return new RpcClient( transport ); }