Base class for Tcp client implementations. More...
Public Member Functions | |
void | Connect (IPEndPoint remoteEndPoint, string applicationId) |
Establishes a connection to the remote host. More... | |
void | Connect (IPEndPoint remoteEndPoint, string applicationId, IPEndPoint localEndPoint) |
Establishes a connection to the remote host. More... | |
void | Disconnect () |
Closes the connection to the remote host. More... | |
SendResult | InitializeEncryption () |
Initializes the peer to receive and send encrypted operations. More... | |
SendResult | SendOperationRequest (OperationRequest operationRequest, SendParameters sendParameters) |
Sends an operation request to the server. More... | |
SendResult | SendPing () |
Sends a ping request to the server. The ping request will be send with Environment.TickCount as the tme stamp. More... | |
SendResult | SendPing (int timeStamp) |
Sends a ping request to the server. More... | |
void | Dispose () |
Releases all resources used this instance. More... | |
SendResult | Send (byte[] data, SendParameters sendParameters) |
Sends bytes ... More... | |
Protected Member Functions | |
TcpClientBase () | |
Initializes a new instance of the TcpClientBase class. More... | |
TcpClientBase (IRpcProtocol protocol) | |
Initializes a new instance of the TcpClientBase class. More... | |
TcpClientBase (Version clientVersion) | |
Initializes a new instance of the TcpClientBase class. More... | |
TcpClientBase (IRpcProtocol protocol, Version clientVersion) | |
Initializes a new instance of the TcpClientBase class. More... | |
virtual void | Dispose (bool disposing) |
Releases unmanaged and - optionally - managed resources More... | |
virtual void | OnReceived (byte[] data, SendParameters sendParameters) |
Invoked when data was received. More... | |
abstract void | OnAsyncSocketError (SocketError socketError) |
A asynchronous operation completed with a SocketError. More... | |
abstract void | OnConnectCompleted () |
On connect completed... More... | |
abstract void | OnConnectError (SocketError socketError) |
On connect error... More... | |
abstract void | OnDisconnect (SocketError socketError) |
On disconnect ... More... | |
abstract void | OnEvent (IEventData eventData, SendParameters sendParameters) |
The on event. More... | |
virtual void | OnInitializeEcryptionCompleted (short resultCode, string debugMessage) |
Invoked if an initialize encryption request was completed. More... | |
abstract void | OnOperationResponse (OperationResponse operationResponse, SendParameters sendParameters) |
The on operation response. More... | |
abstract void | OnPingResponse (PingResponse pingResponse) |
The on ping response. More... | |
Properties | |
string | ApplicationId [get] |
Gets the application id. More... | |
Version | ClientVersion [get] |
Gets the client version. More... | |
bool | Connected [get] |
Gets a value indicating whether this instance is connected to a remote host. More... | |
ICryptoProvider | CryptoProvider [get, set] |
Gets or sets the CryptoProvider. More... | |
IPEndPoint | LocalEndPoint [get] |
Gets the local endpoint. More... | |
IRpcProtocol | Protocol [get] |
Gets the used rpc protocol. More... | |
IPEndPoint | RemoteEndPoint [get] |
Gets the remote end point. More... | |
ConnectionState | ConnectionState [get] |
bool | IsConnectionSecure [get] |
Base class for Tcp client implementations.
|
inlineprotected |
Initializes a new instance of the TcpClientBase class.
|
inlineprotected |
Initializes a new instance of the TcpClientBase class.
protocol | The IRpcProtocol to use for operation and event serialization. |
|
inlineprotected |
Initializes a new instance of the TcpClientBase class.
clientVersion | The client version. |
|
inlineprotected |
Initializes a new instance of the TcpClientBase class.
protocol | The IRpcProtocol to use for operation and event serialization. |
clientVersion | The client version. |
|
inline |
Establishes a connection to the remote host.
remoteEndPoint | The remote end point to connect to. |
applicationId | The photon application to connect to. |
|
inline |
Establishes a connection to the remote host.
remoteEndPoint | The remote end point to connect to. |
applicationId | The photon application to connect to. |
localEndPoint | The local end point to bind the socket to. Use null to avoid binding. |
|
inline |
Closes the connection to the remote host.
|
inline |
Releases all resources used this instance.
|
inlineprotectedvirtual |
Releases unmanaged and - optionally - managed resources
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
|
inline |
Initializes the peer to receive and send encrypted operations.
|
protectedpure virtual |
A asynchronous operation completed with a SocketError.
socketError | The socket error. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
On connect completed...
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
On connect error...
socketError | The error. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
On disconnect ...
socketError | The error. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
The on event.
eventData | The event data. |
sendParameters | The send parameters the event was received with. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
inlineprotectedvirtual |
Invoked if an initialize encryption request was completed.
resultCode | The result code. |
debugMessage | The debuf message. |
Reimplemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
The on operation response.
operationResponse | The operation response. |
sendParameters | The send parameters the event was received with. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
protectedpure virtual |
The on ping response.
pingResponse | The ping response. |
Implemented in Photon.SocketServer.ServerToServer.TcpClient.
|
inlineprotectedvirtual |
Invoked when data was received.
data | The received data. |
sendParameters | The send parameters the data was received with. |
|
inline |
Sends bytes ...
data | The data. |
sendParameters | The send parameters are received on the server and can be used for further dispatching. |
|
inline |
Sends an operation request to the server.
operationRequest | The operation request. |
sendParameters | The send parameters. |
|
inline |
Sends a ping request to the server. The ping request will be send with Environment.TickCount as the tme stamp.
|
inline |
Sends a ping request to the server.
timeStamp | A user definined time stamp. The time stamp will be send back by the server with the ping response ans can be used to mesure the duration of the request. |
|
get |
Gets the application id.
|
get |
Gets the client version.
|
get |
Gets a value indicating whether this instance is connected to a remote host.
|
get |
|
getset |
Gets or sets the CryptoProvider.
|
get |
|
get |
Gets the local endpoint.
|
get |
Gets the used rpc protocol.
|
get |
Gets the remote end point.