![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
Base class for socket-based communications. More...
Public Member Functions | |
void | Start (bool async, bool secure) |
Connects to the Socket, which is initialised on construction. More... | |
void | Disconnect (bool notify, ServerConnectionState serverState) |
Disconnects from the Socket. More... | |
ClientSocket (ISyncMessageHandler messageHandler, IServerDetails serverDetails) | |
Constructor. Initialises most properties based on the provided IServerDetails. More... | |
void | Close () |
Closes the socket. More... | |
void | SendBytes (byte[] bytes) |
Sends an array of bytes to the Socket. More... | |
void | SendBuffer (ByteBuffer buffer) |
Sends the bytes contained within the ByteBuffer to the Socket. More... | |
void | Write (ByteBuffer buffer) |
Writes a byte buffer to the buffered network stream. The data will only be sent if the buffer is full or if Flush is called. More... | |
void | Flush () |
Flushes the underlying buffered network stream and sends the data to the server. More... | |
bool | AuthenticateSecureConnection () |
Authenticates the secure stream. If the current connection is not useing a secure stream it will return true. More... | |
void | PrepareReceiveMode () |
Starts the socket receive loop. More... | |
Properties | |
bool | AllowSocketNotifications [get, set] |
Flag to allow socket notifications; this was implemented to prevent 'multiple' closure calls further up the API chain. More... | |
bool | SocketConnected [get] |
Returns whether the actual socket object is connected. More... | |
ISyncMessageHandler | MessageHandler [get, set] |
The synchronous message handler. More... | |
IServerDetails | ServerDetails [get, set] |
Get/set the server details. More... | |
string | Host [get, set] |
The host representing the Diffusion server. More... | |
int | Port [get, set] |
The port of the Diffusion server. More... | |
int | TcpKeepAliveInterval [get, set] |
The period on which to send a TCP 'keepalive'. More... | |
int | MaxBufferSize [get, set] |
Get/set the maximum socket buffer size. More... | |
bool | IsConnected [get, set] |
Indicates whether connection is established. More... | |
Events | |
EventHandler < ServerClosedEventArgs > | ConnectionClosed |
Called when the socket connection is closed. More... | |
EventHandler < ServerClosedEventArgs > | ConnectionFailed |
Called when the connection attempt fails. More... | |
Base class for socket-based communications.
PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.ClientSocket | ( | ISyncMessageHandler | messageHandler, |
IServerDetails | serverDetails | ||
) |
Constructor. Initialises most properties based on the provided IServerDetails.
messageHandler | |
serverDetails |
bool PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.AuthenticateSecureConnection | ( | ) |
Authenticates the secure stream. If the current connection is not useing a secure stream it will return true.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.Close | ( | ) |
Closes the socket.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.Disconnect | ( | bool | notify, |
ServerConnectionState | serverState | ||
) |
Disconnects from the Socket.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.Flush | ( | ) |
Flushes the underlying buffered network stream and sends the data to the server.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.PrepareReceiveMode | ( | ) |
Starts the socket receive loop.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.SendBuffer | ( | ByteBuffer | buffer | ) |
Sends the bytes contained within the ByteBuffer to the Socket.
buffer |
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.SendBytes | ( | byte[] | bytes | ) |
Sends an array of bytes to the Socket.
bytes |
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.Start | ( | bool | async, |
bool | secure | ||
) |
Connects to the Socket, which is initialised on construction.
void PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.Write | ( | ByteBuffer | buffer | ) |
Writes a byte buffer to the buffered network stream. The data will only be sent if the buffer is full or if Flush is called.
buffer | The buffer that will be written to the stream. |
|
getset |
Flag to allow socket notifications; this was implemented to prevent 'multiple' closure calls further up the API chain.
|
getset |
The host representing the Diffusion server.
|
getset |
Indicates whether connection is established.
|
getset |
Get/set the maximum socket buffer size.
|
getset |
The synchronous message handler.
|
getset |
The port of the Diffusion server.
|
getset |
Get/set the server details.
|
get |
Returns whether the actual socket object is connected.
|
getset |
The period on which to send a TCP 'keepalive'.
EventHandler<ServerClosedEventArgs> PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.ConnectionClosed |
Called when the socket connection is closed.
EventHandler<ServerClosedEventArgs> PushTechnology.DiffusionCore.Connection.Sockets.ClientSocket.ConnectionFailed |
Called when the connection attempt fails.