public ITransport CreateTransport(Uri location) { var socket = Connect(location.Host, location.Port); socket.ReceiveBufferSize = _stompConnectionSettings.TransportSettings.ReceiveBufferSize; socket.SendBufferSize = _stompConnectionSettings.TransportSettings.SendBufferSize; socket.ReceiveTimeout = _stompConnectionSettings.TransportSettings.ReceiveTimeout; socket.SendTimeout = _stompConnectionSettings.TransportSettings.SendTimeout; var wireFormat = new StompWireFormat { SkipDestinationNameFormatting = _stompConnectionSettings.SkipDestinationNameFormatting, SetHostHeader = _stompConnectionSettings.SetHostHeader, HostHeaderOverride = _stompConnectionSettings.HostHeaderOverride }; var transport = CreateTransport(location, socket, wireFormat); wireFormat.Transport = transport; if (_stompConnectionSettings.TransportSettings.UseLogging) { transport = new LoggingTransport(transport); } if (_stompConnectionSettings.TransportSettings.UseInactivityMonitor) { transport = new InactivityMonitor(transport, wireFormat); } transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); return(transport); }
public ITransport CreateTransport(Uri location) { // Extract query parameters from broker Uri System.Collections.Specialized.StringDictionary map = URISupport.ParseQuery(location.Query); // Set transport. properties on this (the factory) URISupport.SetProperties(this, map, "transport."); // Console.WriteLine("Opening socket to: " + host + " on port: " + port); Socket socket = Connect(location.Host, location.Port); IWireFormat wireformat = CreateWireFormat(location, map); TcpTransport tcpTransport = new TcpTransport(socket, wireformat); wireformat.Transport = tcpTransport; ITransport rc = tcpTransport; if (UseLogging) { rc = new LoggingTransport(rc); } if (wireformat is OpenWireFormat) { rc = new WireFormatNegotiator(rc, (OpenWireFormat)wireformat); } rc = new MutexTransport(rc); rc = new ResponseCorrelator(rc); return(rc); }
private ITransport doConnect(Uri location) { ITransport transport = CreateTransport(URISupport.ParseComposite(location)); transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); return transport; }
private ITransport doConnect(Uri location) { ITransport transport = CreateTransport(URISupport.parseComposite(location)); transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); return(transport); }
public ITransport CreateTransport(Uri location) { ITransport transport = CompositeConnect(location); transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); return(transport); }
public ITransport CreateTransport(Uri location) { ITransport transport = CompositeConnect(location); transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); transport.RequestTimeout = this.requestTimeout; return(transport); }
public ITransport CreateTransport(Uri location) { // Extract query parameters from broker Uri StringDictionary map = URISupport.ParseQuery(location.Query); // Set transport. properties on this (the factory) URISupport.SetProperties(this, map, "transport."); Tracer.Debug("Opening socket to: " + location.Host + " on port: " + location.Port); Socket socket = Connect(location.Host, location.Port); #if !NETCF && !NET_1_1 socket.ReceiveBufferSize = ReceiveBufferSize; socket.SendBufferSize = SendBufferSize; socket.ReceiveTimeout = ReceiveTimeout; socket.SendTimeout = SendTimeout; #endif IWireFormat wireformat = CreateWireFormat(location, map); ITransport transport = new TcpTransport(socket, wireformat); wireformat.Transport = transport; if (UseLogging) { transport = new LoggingTransport(transport); } if (wireformat is OpenWireFormat) { transport = new WireFormatNegotiator(transport, (OpenWireFormat)wireformat); } transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); transport.RequestTimeout = this.requestTimeout; return(transport); }
public ITransport CreateTransport(Uri location) { ITransport transport = CompositeConnect(location); transport = new MutexTransport(transport); transport = new ResponseCorrelator(transport); return transport; }