C# Class SteamKit2.UdpConnection

Inheritance: Connection
Mostrar archivo Open project: Top-Cat/SteamBot

Public Methods

Method Description
Connect ( IPEndPoint endPoint ) : void

Connects to the specified CM server.

Disconnect ( ) : void

Disconnects this instance, blocking until the queue of messages is empty or the connection is otherwise terminated.

GetLocalIP ( ) : IPAddress
Send ( IClientMsg clientMsg ) : void

Serializes and sends the provided message to the server in as many packets as is necessary.

UdpConnection ( ) : System

Private Methods

Method Description
DispatchMessage ( ) : bool

Dispatches up to one message to the rest of SteamKit

NetLoop ( ) : void

Processes incoming packets, maintains connection consistency, and oversees outgoing packets.

ReadyMessageParts ( ) : uint

Returns the number of message parts in the next message.

ReceiveAccept ( SteamKit2.UdpPacket packet ) : void

Receives the notification of an accepted connection and sets the connection id that will be used for the connection's duration.

ReceiveChallenge ( SteamKit2.UdpPacket packet ) : void

Receives the challenge and responds with a Connect request

ReceiveData ( SteamKit2.UdpPacket packet ) : void

Receives typical data packets before dispatching them for consumption by the rest of SteamKit

ReceivePacket ( SteamKit2.UdpPacket packet ) : void

Receives the packet, performs all sanity checks and then passes it along as necessary.

SendAck ( ) : void

Sends a datagram Ack, used when an Ack needs to be sent but there is no data response to piggy-back on.

SendData ( MemoryStream ms ) : void

Sends the data sequenced as a single message, splitting it into multiple parts if necessary.

SendPacket ( SteamKit2.UdpPacket packet ) : void

Sends a packet immediately.

SendPendingMessages ( ) : void

Sends or resends sequenced messages, if necessary. Also responsible for throttling the rate at which they are sent.

SendSequenced ( SteamKit2.UdpPacket packet ) : void

Sends the packet as a sequenced, reliable packet.

Method Details

Connect() public method

Connects to the specified CM server.
public Connect ( IPEndPoint endPoint ) : void
endPoint System.Net.IPEndPoint The CM server.
return void

Disconnect() public method

Disconnects this instance, blocking until the queue of messages is empty or the connection is otherwise terminated.
public Disconnect ( ) : void
return void

GetLocalIP() public method

public GetLocalIP ( ) : IPAddress
return System.Net.IPAddress

Send() public method

Serializes and sends the provided message to the server in as many packets as is necessary.
public Send ( IClientMsg clientMsg ) : void
clientMsg IClientMsg The ClientMsg
return void

UdpConnection() public method

public UdpConnection ( ) : System
return System