public void reply_uri_when_not_durable() { var endpoint = new TcpEndpoint(4444); endpoint.Mode = EndpointMode.BufferedInMemory; endpoint.ReplyUri().ShouldBe($"tcp://localhost:4444".ToUri()); }
public void reply_uri_when_not_durable() { var endpoint = new TcpEndpoint(4444); endpoint.IsDurable = false; endpoint.ReplyUri().ShouldBe($"tcp://localhost:4444".ToUri()); }
public void reply_uri_when_durable() { var endpoint = new TcpEndpoint(4444); endpoint.Mode = EndpointMode.Durable; endpoint.ReplyUri().ShouldBe($"tcp://localhost:4444/durable".ToUri()); }
public void parsing_uri(string uri, string host, int port, EndpointMode mode) { var endpoint = new TcpEndpoint(); endpoint.Parse(uri.ToUri()); endpoint.HostName.ShouldBe(host); endpoint.Port.ShouldBe(port); endpoint.Mode.ShouldBe(mode); }
public void parsing_uri(string uri, string host, int port, bool isDurable) { var endpoint = new TcpEndpoint(); endpoint.Parse(uri.ToUri()); endpoint.HostName.ShouldBe(host); endpoint.Port.ShouldBe(port); endpoint.IsDurable.ShouldBe(isDurable); }
public FastServer() { var endpoint = new TcpEndpoint(16121); _FastServer = new Sessions.FastServer("test", _scpSessionProtocol, endpoint) { SessionHandler = new SessionHandler() }; Global.ErrorHandler = new ServerErrorHandler(); _FastServer.Listen(); }
public FastServer() { var endpoint = new TcpEndpoint(16121); _sessionHandler = new SessionHandler(); var fs = new Sessions.FastServer("test", _scpSessionProtocol, endpoint); Global.ErrorHandler = new ServerErrorHandler(); fs.SessionHandler = _sessionHandler; fs.Listen(); }
public TcpServiceConnection(TcpClient tcpClient, TcpEndpoint tcpEndPoint, string hostListenerName, bool closeAfterSend, Listener listener, Encoding encoding) : base(tcpClient, tcpEndPoint, hostListenerName, closeAfterSend) { this.listener = listener; this.encoding = encoding; }
public override TcpBaseServiceConnection CreateClientConnectionHandler(TcpClient tcpClient, TcpEndpoint tcpEndPoint, string hostListenerName, bool closeAfterSend) { return(new TcpServiceConnection(tcpClient, tcpEndPoint, hostListenerName, closeAfterSend, listener, encoding)); }
/// <summary> /// Directs the application to listen at the designated port in a /// fast, but non-durable way /// </summary> /// <param name="port"></param> public IListenerConfiguration ListenAtPort(int port) { var settings = Get <TcpTransport>().ListenTo(TcpEndpoint.ToUri(port)); return(new ListenerConfiguration(settings)); }
/// <summary> /// Publish messages using the TCP transport to the specified /// server name and port /// </summary> /// <param name="hostName"></param> /// <param name="port"></param> public ISubscriberConfiguration ToServerAndPort(string hostName, int port) { var uri = TcpEndpoint.ToUri(port, hostName); return(To(uri)); }
/// <summary> /// Publish the designated message types using Jasper's lightweight /// TCP transport locally to the designated port number /// </summary> /// <param name="port"></param> public ISubscriberConfiguration ToPort(int port) { var uri = TcpEndpoint.ToUri(port); return(To(uri)); }