C# 클래스 Lidgren.Network.NetConnection

파일 보기 프로젝트 열기: Fr0sZ/Skylines-Multiplayer 1 사용 예제들

공개 메소드들

메소드 설명
Approve ( ) : void

Approves this connection; sending a connection response to the remote host

Approve ( NetOutgoingMessage localHail ) : void

Approves this connection; sending a connection response to the remote host

CanSendImmediately ( NetDeliveryMethod method, int sequenceChannel ) : bool
Deny ( ) : void

Denies this connection; disconnecting it

Deny ( string reason ) : void

Denies this connection; disconnecting it

Disconnect ( string byeMessage ) : void

Disconnect from the remote peer

GetLocalTime ( double remoteTimestamp ) : double

Gets local time value comparable to NetTime.Now from a remote value

GetRemoteTime ( double localTimestamp ) : double

Gets the remote time value for a local time value produced by NetTime.Now

GetSendQueueInfo ( NetDeliveryMethod method, int sequenceChannel, int &windowSize, int &freeWindowSlots ) : void

Zero windowSize indicates that the channel is not yet instantiated (used) Negative freeWindowSlots means this amount of messages are currently queued but delayed due to closed window

SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel ) : NetSendResult

Send a message to this remote connection

ToString ( ) : string

Returns a string that represents this object

비공개 메소드들

메소드 설명
CreateReceiverChannel ( NetMessageType tp ) : Lidgren.Network.NetReceiverChannelBase
CreateSenderChannel ( NetMessageType tp ) : Lidgren.Network.NetSenderChannelBase
EnqueueMessage ( NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel ) : NetSendResult
ExecuteDisconnect ( string reason, bool sendByeMessage ) : void
ExpandMTU ( double now ) : void
FinalizeMTU ( int size ) : void
GetResendDelay ( ) : float
HandleConnectResponse ( double now, NetMessageType tp, int ptr, int payloadLength ) : void
HandleExpandMTUSuccess ( double now, int size ) : void
Heartbeat ( float now, uint frameCounter ) : void
InitExpandMTU ( double now ) : void
InitializePing ( ) : void
InitializeRemoteTimeOffset ( float remoteSendTime ) : void
MTUExpansionHeartbeat ( double now ) : void
MutateEndPoint ( IPEndPoint endPoint ) : void

Change the internal endpoint to this new one. Used when, during handshake, a switch in port is detected (due to NAT)

NetConnection ( NetPeer peer, IPEndPoint remoteEndPoint ) : System
QueueAck ( NetMessageType tp, int sequenceNumber ) : void
QueueSendMessage ( NetOutgoingMessage om, int seqNr ) : void
ReceivedHandshake ( double now, NetMessageType tp, int ptr, int payloadLength ) : void
ReceivedLibraryMessage ( NetMessageType tp, int ptr, int payloadLength ) : void
ReceivedMessage ( NetIncomingMessage msg ) : void
ReceivedPong ( float now, int pongNumber, float remoteSendTime ) : void
SendConnect ( float now ) : void
SendConnectResponse ( float now, bool onLibraryThread ) : void
SendConnectionEstablished ( ) : void
SendDisconnect ( string reason, bool onLibraryThread ) : void
SendExpandMTU ( double now, int size ) : void
SendMTUSuccess ( int size ) : void
SendPing ( ) : void
SendPong ( int pingNumber ) : void
SetStatus ( NetConnectionStatus status, string reason ) : void
Shutdown ( string reason ) : void
UnconnectedHeartbeat ( float now ) : void
ValidateHandshakeData ( int ptr, int payloadLength, byte &hail ) : bool
WriteLocalHail ( NetOutgoingMessage om ) : void

메소드 상세

Approve() 공개 메소드

Approves this connection; sending a connection response to the remote host
public Approve ( ) : void
리턴 void

Approve() 공개 메소드

Approves this connection; sending a connection response to the remote host
public Approve ( NetOutgoingMessage localHail ) : void
localHail NetOutgoingMessage The local hail message that will be set as RemoteHailMessage on the remote host
리턴 void

CanSendImmediately() 공개 메소드

public CanSendImmediately ( NetDeliveryMethod method, int sequenceChannel ) : bool
method NetDeliveryMethod
sequenceChannel int
리턴 bool

Deny() 공개 메소드

Denies this connection; disconnecting it
public Deny ( ) : void
리턴 void

Deny() 공개 메소드

Denies this connection; disconnecting it
public Deny ( string reason ) : void
reason string The stated reason for the disconnect, readable as a string in the StatusChanged message on the remote host
리턴 void

Disconnect() 공개 메소드

Disconnect from the remote peer
public Disconnect ( string byeMessage ) : void
byeMessage string the message to send with the disconnect message
리턴 void

GetLocalTime() 공개 메소드

Gets local time value comparable to NetTime.Now from a remote value
public GetLocalTime ( double remoteTimestamp ) : double
remoteTimestamp double
리턴 double

GetRemoteTime() 공개 메소드

Gets the remote time value for a local time value produced by NetTime.Now
public GetRemoteTime ( double localTimestamp ) : double
localTimestamp double
리턴 double

GetSendQueueInfo() 공개 메소드

Zero windowSize indicates that the channel is not yet instantiated (used) Negative freeWindowSlots means this amount of messages are currently queued but delayed due to closed window
public GetSendQueueInfo ( NetDeliveryMethod method, int sequenceChannel, int &windowSize, int &freeWindowSlots ) : void
method NetDeliveryMethod
sequenceChannel int
windowSize int
freeWindowSlots int
리턴 void

SendMessage() 공개 메소드

Send a message to this remote connection
public SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel ) : NetSendResult
msg NetOutgoingMessage The message to send
method NetDeliveryMethod How to deliver the message
sequenceChannel int Sequence channel within the delivery method
리턴 NetSendResult

ToString() 공개 메소드

Returns a string that represents this object
public ToString ( ) : string
리턴 string