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.
ファイルを表示 Open project: Top-Cat/SteamBot

Public Properties

Property Type Description
Servers System.Net.IPAddress[]

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

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.
return System

Connect() public method

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. ///
return void

Disconnect() public method

Disconnects this client.
public Disconnect ( ) : void
return void

GetServersOfType() public method

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

OnClientConnected() protected abstract method

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

OnClientDisconnected() protected abstract method

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

OnClientMsgReceived() protected method

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

Send() public method

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.
return void

Property Details

Servers public_oe static_oe property

Bootstrap list of CM servers.
public static IPAddress[],System.Net Servers
return System.Net.IPAddress[]