프로퍼티 | 타입 | 설명 | |
---|---|---|---|
Connected | void | ||
Disconnected | void | ||
GenerateDrop | byte | ||
GenerateLoss | byte | ||
GeneratePing | byte | ||
GetFirstSequence | ushort | ||
GetTimeSinceRecv | long | ||
NetPeer | System | ||
OnNotificationReceived | void | ||
OnPayloadReceived | void | ||
OnPeerClosed | void | ||
OnPeerConnected | void | ||
OnReceiveCarrier | void | ||
OnReceiveNotification | bool | ||
OnReceiveOther | void | ||
OnReceivePayload | bool | ||
OnReceivePing | void | ||
OnReceivePong | void | ||
QueueNotification | bool | ||
SetCore | void | ||
Update | void |
메소드 | 설명 | |
---|---|---|
Close ( byte userReason = NetConfig.DEFAULT_USER_REASON ) : void |
Closes the peer's network connection for a given reason byte.
|
|
QueueNotification ( byte data, ushort length ) : bool |
Queues a reliable ordered notification for delivery.
|
|
SendPayload ( byte data, ushort length ) : SocketError |
Immediately sends an unreliable sequenced payload.
|
메소드 | 설명 | |
---|---|---|
Connected ( ) : void |
Make sure this is called before exposing the peer to the main thread.
|
|
Disconnected ( ) : void | ||
GenerateDrop ( ) : byte |
Returns the statistics on dropped packets.
|
|
GenerateLoss ( ) : byte |
Returns the statistics on lost packets.
|
|
GeneratePing ( long curTime ) : byte |
Advances the outgoing ping sequence.
|
|
GetFirstSequence ( ) : ushort |
If we have outgoing notifications, returns the sequence of the first.
|
|
GetTimeSinceRecv ( long curTime ) : long |
Returns the time (in ms) since we last received useful data.
|
|
NetPeer ( |
||
OnNotificationReceived ( byte data, int dataLength ) : void | ||
OnPayloadReceived ( byte data, int dataLength ) : void | ||
OnPeerClosed ( NetCloseReason reason, byte userKickReason, SocketError error ) : void | ||
OnPeerConnected ( ) : void | ||
OnReceiveCarrier ( long curTime, ushort notificationAck, Action |
Cleans out any notifications older than the received carrier ack.
|
|
OnReceiveNotification ( long curTime, ushort notificationSeq ) : bool |
Processes a notification and updates our ack counter. Return true iff the notification is new.
|
|
OnReceiveOther ( long curTime ) : void |
Records the fact that we've received data.
|
|
OnReceivePayload ( long curTime, ushort sequence ) : bool |
Logs the payload's sequence ID to record payload packet loss. Returns true if we should accept the payload, false if it's too old.
|
|
OnReceivePing ( long curTime, byte loss ) : void |
Processes statistics received from pong packets.
|
|
OnReceivePong ( long curTime, byte pongSeq, byte drop ) : void |
Processes statistics received from pong packets.
|
|
QueueNotification ( NetEvent data ) : bool |
Queues a new notification to be send out reliably during ticks.
|
|
SetCore ( |
||
Update ( long curTime ) : void |
public Close ( byte userReason = NetConfig.DEFAULT_USER_REASON ) : void | ||
userReason | byte | |
리턴 | void |
public QueueNotification ( byte data, ushort length ) : bool | ||
data | byte | |
length | ushort | |
리턴 | bool |
public SendPayload ( byte data, ushort length ) : SocketError | ||
data | byte | |
length | ushort | |
리턴 | SocketError |