Class TcpTransport
  
  An implementation of ITransport that uses sockets to communicate with the broker
    Inheritance
    System.Object
    TcpTransport
      
   
  
    Implements
    
    Apache.NMS.IStartable
    System.IDisposable
    Apache.NMS.IStoppable
   
  
    Inherited Members
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: Apache.NMS.ActiveMQ.dll
  Syntax
  
    public class TcpTransport : ITransport, IStartable, IDisposable, IStoppable
   
  Constructors
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public TcpTransport(Uri uri, Socket socket, IWireFormat wireformat)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Uri | uri |  | 
      
        | System.Net.Sockets.Socket | socket |  | 
      
        | IWireFormat | wireformat |  | 
    
  
  Fields
  
  
    |
    Improve this Doc
  
  
    View Source
  
  myLock
  
  
  Declaration
  
    protected readonly object myLock
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Object |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  socket
  
  
  Declaration
  
    protected readonly Socket socket
   
  Field Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Net.Sockets.Socket |  | 
    
  
  Properties
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AsyncTimeout
  Timeout in milliseconds to wait for sending asynchronous messages or commands.
Set to -1 for infinite timeout.
Declaration
  
    public int AsyncTimeout { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Command
  
  
  Declaration
  
    public CommandHandler Command { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Exception
  
  
  Declaration
  
    public ExceptionHandler Exception { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Interrupted
  
  
  Declaration
  
    public InterruptedHandler Interrupted { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsConnected
  
  
  Declaration
  
    public bool IsConnected { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsDisposed
  
  
  Declaration
  
    public bool IsDisposed { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsFaultTolerant
  
  
  Declaration
  
    public bool IsFaultTolerant { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsReconnectSupported
  
  
  Declaration
  
    public bool IsReconnectSupported { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsStarted
  
  
  Declaration
  
    public bool IsStarted { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IsUpdateURIsSupported
  
  
  Declaration
  
    public bool IsUpdateURIsSupported { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ReceiveBufferSize
  
  
  Declaration
  
    public int ReceiveBufferSize { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RemoteAddress
  
  
  Declaration
  
    public Uri RemoteAddress { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Uri |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Resumed
  
  
  Declaration
  
    public ResumedHandler Resumed { get; set; }
   
  Property Value
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  SendBufferSize
  
  
  Declaration
  
    public int SendBufferSize { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TcpNoDelayEnabled
  
  
  Declaration
  
    public bool TcpNoDelayEnabled { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Timeout
  Timeout in milliseconds to wait for sending synchronous messages or commands.
Set to -1 for infinite timeout.
Declaration
  
    public int Timeout { get; set; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public IWireFormat WireFormat { get; set; }
   
  Property Value
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AsyncRequest(Command)
  
  
  Declaration
  
    public FutureResponse AsyncRequest(Command command)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Command | command |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Close()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  CreateSocketStream()
  
  
  Declaration
  
    protected virtual Stream CreateSocketStream()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.IO.Stream |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Dispose()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Dispose(Boolean)
  
  
  Declaration
  
    protected void Dispose(bool disposing)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | disposing |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Finalize()
  
  
  Declaration
  
    protected void Finalize()
   
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Narrow(Type)
  
  
  Declaration
  
    public object Narrow(Type type)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Type | type |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Object |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Oneway(Command)
  
  
  Declaration
  
    public virtual void Oneway(Command command)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Command | command |  | 
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ReadLoop()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Request(Command)
  
  
  Declaration
  
    public Response Request(Command command)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Command | command |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Request(Command, TimeSpan)
  
  
  Declaration
  
    public Response Request(Command command, TimeSpan timeout)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Command | command |  | 
      
        | System.TimeSpan | timeout |  | 
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Start()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Stop()
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  UpdateURIs(Boolean, Uri[])
  
  
  Declaration
  
    public void UpdateURIs(bool rebalance, Uri[] updatedURIs)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | rebalance |  | 
      
        | System.Uri[] | updatedURIs |  | 
    
  
  Implements
  
  
      Apache.NMS.IStartable
  
  
      System.IDisposable
  
  
      Apache.NMS.IStoppable