C# Класс ShootManiaXMLRPC.XmlRpc.XmlRpcClient

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AsyncRequest ( string inMethodName, object inParams, GbxCallCallbackHandler callbackHandler ) : int

Sends a Request and does not wait for a response of the server. The response will be written into a buffer or you can set a callback method that will be executed.

Connect ( ) : int

Creates a connection to the server.

Disconnect ( ) : void

Closes the socket connection.

Dispose ( ) : void

Frees all resources and disconnects from the rpc server.

EnableCallbacks ( bool inState ) : bool

(Dis)activates callbacks from the server.

GetResponse ( int inHandle ) : GbxCall

Gets an asynchron response from the list.

Request ( string inMethodName, object inParams ) : GbxCall

Sends a request to the server and blocks until a response has been received.

XmlRpcClient ( string inAddress, int inPort ) : System

Initializes the client with port and ip address. Use Connect method to set up a connection.

Приватные методы

Метод Описание
Handshake ( ) : bool

Reads the header of the protocol and checks if for compability.

OnDataArrive ( IAsyncResult iar ) : void
OnDisconnectCallback ( ) : void
OnGbxCallback ( GbxCallbackEventArgs e ) : void
SocketConnect ( string inAddress, int inPort ) : bool

Establishes a socket connection.

Описание методов

AsyncRequest() публичный Метод

Sends a Request and does not wait for a response of the server. The response will be written into a buffer or you can set a callback method that will be executed.
public AsyncRequest ( string inMethodName, object inParams, GbxCallCallbackHandler callbackHandler ) : int
inMethodName string The method to call.
inParams object Parameters describing your request.
callbackHandler GbxCallCallbackHandler An optional delegate which is callen when the response is available otherwise set it to null.
Результат int

Connect() публичный Метод

Creates a connection to the server.
public Connect ( ) : int
Результат int

Disconnect() публичный Метод

Closes the socket connection.
public Disconnect ( ) : void
Результат void

Dispose() публичный Метод

Frees all resources and disconnects from the rpc server.
public Dispose ( ) : void
Результат void

EnableCallbacks() публичный Метод

(Dis)activates callbacks from the server.
public EnableCallbacks ( bool inState ) : bool
inState bool Whether to receive callbacks from the server.
Результат bool

GetResponse() публичный Метод

Gets an asynchron response from the list.
public GetResponse ( int inHandle ) : GbxCall
inHandle int The handle which was returned from AsyncRequest.
Результат GbxCall

Request() публичный Метод

Sends a request to the server and blocks until a response has been received.
public Request ( string inMethodName, object inParams ) : GbxCall
inMethodName string The method to call.
inParams object Parameters describing your request.
Результат GbxCall

XmlRpcClient() публичный Метод

Initializes the client with port and ip address. Use Connect method to set up a connection.
public XmlRpcClient ( string inAddress, int inPort ) : System
inAddress string IP address to initialize with.
inPort int Port to initialize the client with.
Результат System