C# Class SteamKit2.Internal.CMClient

This base client handles the underlying connection to a CM server. This class should not be use directly, but through the SteamClient class.
Afficher le fichier Open project: Top-Cat/SteamBot

Méthodes publiques

Свойство Type Description
Servers System.Net.IPAddress[]

Méthodes publiques

Méthode Description
CMClient ( ProtocolType type = ProtocolType.Tcp ) : System

Initializes a new instance of the CMClient class with a specific connection type.

Connect ( bool bEncrypted = true ) : void

Connects this client to a Steam3 server. This begins the process of connecting and encrypting the data channel between the client and the server. Results are returned in a SteamClient.ConnectedCallback.

Disconnect ( ) : void

Disconnects this client.

GetServersOfType ( EServerType type ) : List

Returns the list of servers matching the given type

Send ( IClientMsg msg ) : void

Sends the specified client message to the server. This method automatically assigns the correct SessionID and SteamID of the message.

Méthodes protégées

Méthode Description
OnClientConnected ( ) : void

Called when the client is connected to Steam3 and is ready to send messages.

OnClientDisconnected ( ) : void

Called when the client is physically disconnected from Steam3.

OnClientMsgReceived ( IPacketMsg packetMsg ) : void

Called when a client message is received from the network.

Private Methods

Méthode Description
Connected ( object sender, EventArgs e ) : void
Disconnected ( object sender, EventArgs e ) : void
GetPacketMsg ( byte data ) : IPacketMsg
HandleEncryptRequest ( IPacketMsg packetMsg ) : void
HandleEncryptResult ( IPacketMsg packetMsg ) : void
HandleLogOnResponse ( IPacketMsg packetMsg ) : void
HandleLoggedOff ( IPacketMsg packetMsg ) : void
HandleMulti ( IPacketMsg packetMsg ) : void
HandleServerList ( IPacketMsg packetMsg ) : void
NetMsgReceived ( object sender, NetMsgEventArgs e ) : void

Method Details

CMClient() public méthode

Initializes a new instance of the CMClient class with a specific connection type.
/// The provided is not supported. /// Only Tcp and Udp are available. ///
public CMClient ( ProtocolType type = ProtocolType.Tcp ) : System
type ProtocolType The connection type to use.
Résultat System

Connect() public méthode

Connects this client to a Steam3 server. This begins the process of connecting and encrypting the data channel between the client and the server. Results are returned in a SteamClient.ConnectedCallback.
public Connect ( bool bEncrypted = true ) : void
bEncrypted bool /// If set to true the underlying connection to Steam will be encrypted. This is the default mode of communication. /// Previous versions of SteamKit always used encryption. ///
Résultat void

Disconnect() public méthode

Disconnects this client.
public Disconnect ( ) : void
Résultat void

GetServersOfType() public méthode

Returns the list of servers matching the given type
public GetServersOfType ( EServerType type ) : List
type EServerType Server type requested
Résultat List

OnClientConnected() protected abstract méthode

Called when the client is connected to Steam3 and is ready to send messages.
protected abstract OnClientConnected ( ) : void
Résultat void

OnClientDisconnected() protected abstract méthode

Called when the client is physically disconnected from Steam3.
protected abstract OnClientDisconnected ( ) : void
Résultat void

OnClientMsgReceived() protected méthode

Called when a client message is received from the network.
protected OnClientMsgReceived ( IPacketMsg packetMsg ) : void
packetMsg IPacketMsg The packet message.
Résultat void

Send() public méthode

Sends the specified client message to the server. This method automatically assigns the correct SessionID and SteamID of the message.
public Send ( IClientMsg msg ) : void
msg IClientMsg The client message to send.
Résultat void

Property Details

Servers public_oe static_oe property

Bootstrap list of CM servers.
public static IPAddress[],System.Net Servers
Résultat System.Net.IPAddress[]