AMPS C# Client
5.3.5.0
AMPS C# Client for .NET
|
The SSL Socket implementation of TCPSTransport. TCPS Transport delegates to an instance of this class. This is used internally by the client's transport. There is usually no reason to make direct use of it. Its functionality is best accessed via the client instance. More...
Public Member Functions | |
TCPSTransportImpl (Protocol protocol, Properties properties) | |
Constructs a TCPSTransportImpl object for the given Protocol and Properties. More... | |
![]() | |
delegate void | ExceptionListener (Exception e) |
TCPTransportImpl (Protocol messageType_, Properties properties_) | |
Initializes a new instance of the TCPTransportImpl class with the specified message type and properties. More... | |
void | setTransportFilter (TransportFilterModifiable filter_) |
Sets the transport filter for the TCP transport. More... | |
void | setReadTimeout (int readTimeoutMillis_) |
Sets the read timeout for the TCP transport. More... | |
void | setMessageHandler (MessageHandler h) |
Sets the message handler for the TCP transport. More... | |
void | setDisconnectHandler (TransportDisconnectHandler h) |
Sets the disconnect handler for the TCP transport. More... | |
void | setExceptionListener (ExceptionListener e) |
Sets the exception listener for the TCP transport. More... | |
void | setThreadCreatedHandler (ThreadCreatedHandler handler) |
Sets the thread created handler for the TCP transport. More... | |
Action | getIdleAction () |
Gets the idle action for the TCP transport. More... | |
void | setIdleAction (Action idleAction) |
void | connect (Uri addr) |
Establishes a connection to the specified address. More... | |
void | disconnect () |
Disconnects the TCP transport. More... | |
void | send (MemoryStream buf) |
Sends the data contained in the provided memory stream over the socket. More... | |
Socket | socket () |
Returns the socket associated with this TCP transport. More... | |
long | writeQueueSize () |
Returns the size of the write queue. More... | |
long | readQueueSize () |
Returns the size of the read queue. More... | |
long | flush () |
Flushes any pending data in the TCP transport. More... | |
long | flush (long timeout) |
Flushes any pending data in the TCP transport with a specified timeout. More... | |
virtual TCPTransport | createTransport (Protocol messageType, TCPTransportImpl impl) |
Creates a new TCP transport based on the provided protocol and implementation. More... | |
virtual void | handleCloseEvent (int failedVersion_, String message, Exception exception) |
Handles a close event, such as a disconnection or error, by invoking the appropriate disconnect handler. More... | |
void | initFromClient (Client client) |
Initializes the transport configuration from the provided client. More... | |
Protected Member Functions | |
override void | createStream (Uri uri) |
Creates an SSL stream for the specified URI. More... | |
![]() | |
void | broadcastException (Exception e) |
Broadcasts an exception to the exception listener if available. More... | |
virtual IPAddress | resolveAddress (Uri addr) |
Resolves the IP address for the provided URI. More... | |
virtual void | createSocket () |
Creates a socket based on the resolved address. More... | |
virtual void | connectSocket (Uri addr) |
Connects the socket to the specified URI. More... | |
void | handshake () |
Initiates the handshake process for the transport. More... | |
virtual void | applySocketProperty (String propertyName, String propertyValue) |
Applies a socket property to self. Override this to add custom properties to your transport or intercept the stock ones. More... | |
Additional Inherited Members | |
![]() | |
readonly object | _lock = new object() |
volatile int | _connectionVersion = 0 |
![]() | |
Client | _client = null |
Uri | _addr |
IPAddress | _resolvedAddr |
Stream | _socketStream = null |
Socket | _socket = null |
bool | _httpPreflight = false |
bool | _handshakeSetStream = false |
The SSL Socket implementation of TCPSTransport. TCPS Transport delegates to an instance of this class. This is used internally by the client's transport. There is usually no reason to make direct use of it. Its functionality is best accessed via the client instance.
|
inline |
Constructs a TCPSTransportImpl object for the given Protocol and Properties.
protocol | The protocol for communication with AMPS. |
properties | The properties to configure the transport. |
|
inlineprotectedvirtual |
Creates an SSL stream for the specified URI.
uri | The URI to create the stream for. |
Reimplemented from AMPS.Client.TCPTransportImpl.