C# Class ShootManiaXMLRPC.XmlRpc.XmlRpcClient

Afficher le fichier Open project: JuJuBoSc/SMAdminTools Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AsyncRequest() public méthode

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.
Résultat int

Connect() public méthode

Creates a connection to the server.
public Connect ( ) : int
Résultat int

Disconnect() public méthode

Closes the socket connection.
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

Frees all resources and disconnects from the rpc server.
public Dispose ( ) : void
Résultat void

EnableCallbacks() public méthode

(Dis)activates callbacks from the server.
public EnableCallbacks ( bool inState ) : bool
inState bool Whether to receive callbacks from the server.
Résultat bool

GetResponse() public méthode

Gets an asynchron response from the list.
public GetResponse ( int inHandle ) : GbxCall
inHandle int The handle which was returned from AsyncRequest.
Résultat GbxCall

Request() public méthode

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.
Résultat GbxCall

XmlRpcClient() public méthode

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.
Résultat System