Monkey Documentation

Class NetworkSerial

This is an internal base-class for NetworkEngine, that provides useful I/O routines. More...


Extended by:
Constants:
  • INITIAL_MEGA_PACKET_ID : PacketID
  • INITIAL_PACKET_ID : PacketID
  • INTERNAL_MSG_CONNECT : MessageType
  • INTERNAL_MSG_DISCONNECT : MessageType
  • INTERNAL_MSG_MEGA_PACKET_ACTION : MessageType
  • INTERNAL_MSG_MEGA_PACKET_RESPONSE : MessageType
  • INTERNAL_MSG_PACKET_CONFIRM : MessageType
  • INTERNAL_MSG_PING : MessageType
  • INTERNAL_MSG_PONG : MessageType
  • INTERNAL_MSG_REQUEST_DISCONNECTION : MessageType
  • INTERNAL_MSG_REQUEST_MEGA_PACKET : MessageType
  • INTERNAL_MSG_WARNING : MessageType
  • MEGA_PACKET_ACTION_CHUNK_RESIZE : PacketExtAction
  • MEGA_PACKET_ACTION_REQUEST_CHUNK : PacketExtAction
  • MEGA_PACKET_ACTION_REQUEST_CHUNK_LOAD : PacketExtAction
  • MEGA_PACKET_RESPONSE_ABORT : PacketExtResponse
  • MEGA_PACKET_RESPONSE_ACCEPT : PacketExtResponse
  • MEGA_PACKET_RESPONSE_CLOSE : PacketExtResponse
  • MEGA_PACKET_RESPONSE_TIMEOUT : PacketExtResponse
  • MEGA_PACKET_RESPONSE_TOO_MANY_CHUNKS : PacketExtResponse
  • MSG_TYPE_CUSTOM : MessageType
  • MSG_TYPE_ERROR : MessageType
  • MSG_TYPE_INTERNAL : MessageType
  • PACKET_HEADER_MARGIN : Int
Methods:
Functions:

Detailed Discussion

This is an internal base-class for NetworkEngine, that provides useful I/O routines. (Abstract)

Method Documentation

Method ReadInternalMessageHeader : MessageType ( P:Stream )

This reads the header of an internal message from P, returning its internal type. This method is protected.

Method WriteInternalMessageHeader : Void ( P:Stream, InternalType:MessageType )

This writes the header of an internal message of type InternalType to P. This method is protected.

Method Write_MegaPacket_Action : Void ( P:Stream, MP:MegaPacket, Action:PacketExtAction, IsTheirPacket:Bool )

This writes the main segment of a mega-packet action message to P. This operation includes the internal-message header. This method is protected.

Method Write_MegaPacket_Response : Void ( P:Stream, ID:PacketID, Reason:PacketExtResponse, IsTheirPacket:Bool )

This writes the main segment of a mega-packet response message to P. This operation includes the internal-message header. This method is protected.

Method Write_MegaPacket_Response : Void ( P:Stream, MP:MegaPacket, Reason:PacketExtResponse, IsTheirPacket:Bool )

This uses MP to satisfy the 'ID' argument of the main overload. This method is protected.


Function Documentation

Function ReadBool : Bool ( S:Stream )

This reads a boolean from S. See also: WriteBool

Function ReadMessageType : MessageType ( S:Stream )

This reads a MessageType from S. See also: WriteMessageType

Function ReadNetSize : Int ( S:Stream )

This reads an integer from S of an internally defined size, and returns it. See also: WriteNetSize

Function ReadPacketExtAction : PacketExtAction ( S:Stream )

This reads a PacketExtAction from S. See also: WritePacketExtAction

Function ReadPacketExtResponse : PacketExtResponse ( S:Stream )

This reads a PacketExtResponse from S. See also: WritePacketExtResponse

Function ReadPacketID : PacketID ( S:Stream )

This reads a PacketID from S. See also: WritePacketID

Function WriteBool : Void ( S:Stream, Value:Bool )

This writes Value to S. See also: ReadBool

Function WriteMessageType : Void ( S:Stream, InternalType:MessageType )

This writes InternalType to S. See also: ReadMessageType

Function WriteNetSize : Void ( S:Stream, Size:Int )

This writes Size to S. See also: ReadNetSize

Function WritePacketExtAction : Void ( S:Stream, Action:PacketExtAction )

This writes Action to S. See also: ReadPacketExtAction

Function WritePacketExtResponse : Void ( S:Stream, Response:PacketExtResponse )

This writes Response to S. See also: ReadPacketExtResponse

Function WritePacketID : Void ( S:Stream, ID:PacketID )

This writes ID to S. See also: ReadPacketID