Provides methods to communicate with other photon server applications. More...
Public Member Functions | |
TcpClient () | |
Initializes a new instance of the TcpClient class. More... | |
TcpClient (IRpcProtocol protocol) | |
TcpClient (Version clientVersion) | |
Initializes a new instance of the TcpClient class. More... | |
TcpClient (IRpcProtocol protocol, Version clientVersion) | |
Initializes a new instance of the TcpClient class. More... | |
Public Member Functions inherited from Photon.SocketServer.ServerToServer.TcpClientBase | |
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 | |
override void | OnAsyncSocketError (SocketError socketError) |
Invokes the AsyncSocketError event. More... | |
override void | OnConnectCompleted () |
Raises the ConnectCompleted event. More... | |
override void | OnConnectError (SocketError error) |
Raises the ConnectError event. More... | |
override void | OnDisconnect (SocketError socketError) |
Raises the Disconnected event. More... | |
override void | OnEvent (IEventData eventData, SendParameters sendParameters) |
Raises the Event event. More... | |
override void | OnInitializeEcryptionCompleted (short resultCode, string debugMessage) |
Raises the InitializeEncryptionCompleted event. More... | |
override void | OnOperationResponse (OperationResponse operationResponse, SendParameters sendParameters) |
Raises the OperationResponse event. More... | |
override void | OnPingResponse (PingResponse pingResponse) |
Raises the PingResponse event. More... | |
Protected Member Functions inherited from Photon.SocketServer.ServerToServer.TcpClientBase | |
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... | |
Events | |
EventHandler< SocketErrorEventArgs > | AsyncSocketError |
Invoked if an async operation completed with a SocketError. More... | |
EventHandler | ConnectCompleted |
Invoked when the client succussfully connected to the remote host. More... | |
EventHandler< SocketErrorEventArgs > | ConnectError |
Invoked when an error occures during a connection attempt. More... | |
EventHandler< SocketErrorEventArgs > | Disconnected |
Invoked when the client has been diconnected. More... | |
EventHandler< EventDataEventArgs > | Event |
Occurs when an event has been received from the remote host. More... | |
EventHandler< InitializeEncryptionEventArgs > | InitializeEncryptionCompleted |
Occurs when an inittlaize encryption response has been received from the remote host. More... | |
EventHandler< OperationResponseEventArgs > | OperationResponse |
Occurs when an operation response hav been received from the remote host. More... | |
EventHandler< PingResponseEventArgs > | PingResponse |
Occurs when a ping response has been received from the remote host. More... | |
Additional Inherited Members | |
Properties inherited from Photon.SocketServer.ServerToServer.TcpClientBase | |
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] |
Provides methods to communicate with other photon server applications.
|
inline |
Initializes a new instance of the TcpClient class.
|
inline |
Initializes a new instance of the TcpClient class.
protocol | The IRpcProtocol to use for operation and event serialization. |
|
inline |
Initializes a new instance of the TcpClient class.
clientVersion | The client version. |
|
inline |
Initializes a new instance of the TcpClient class.
protocol | The IRpcProtocol to use for operation and event serialization. |
clientVersion | The client version. |
|
inlineprotectedvirtual |
Invokes the AsyncSocketError event.
socketError | The socket error. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the ConnectCompleted event.
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the ConnectError event.
error | The socket error which occured during teh connection attempt. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the Disconnected event.
socketError | The socket error code. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the Event event.
eventData | The event data. |
sendParameters | The send parameters the response was received with. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the InitializeEncryptionCompleted event.
resultCode | The result code received from the remote host. |
debugMessage | The debug message received from the remote host. |
Reimplemented from Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the OperationResponse event.
operationResponse | The operation response. |
sendParameters | The send parameters the response was received with. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
|
inlineprotectedvirtual |
Raises the PingResponse event.
pingResponse | The ping response. |
Implements Photon.SocketServer.ServerToServer.TcpClientBase.
EventHandler<SocketErrorEventArgs> Photon.SocketServer.ServerToServer.TcpClient.AsyncSocketError |
Invoked if an async operation completed with a SocketError.
EventHandler Photon.SocketServer.ServerToServer.TcpClient.ConnectCompleted |
Invoked when the client succussfully connected to the remote host.
EventHandler<SocketErrorEventArgs> Photon.SocketServer.ServerToServer.TcpClient.ConnectError |
Invoked when an error occures during a connection attempt.
EventHandler<SocketErrorEventArgs> Photon.SocketServer.ServerToServer.TcpClient.Disconnected |
Invoked when the client has been diconnected.
EventHandler<EventDataEventArgs> Photon.SocketServer.ServerToServer.TcpClient.Event |
Occurs when an event has been received from the remote host.
EventHandler<InitializeEncryptionEventArgs> Photon.SocketServer.ServerToServer.TcpClient.InitializeEncryptionCompleted |
Occurs when an inittlaize encryption response has been received from the remote host.
EventHandler<OperationResponseEventArgs> Photon.SocketServer.ServerToServer.TcpClient.OperationResponse |
Occurs when an operation response hav been received from the remote host.
EventHandler<PingResponseEventArgs> Photon.SocketServer.ServerToServer.TcpClient.PingResponse |
Occurs when a ping response has been received from the remote host.