메소드 | 설명 | |
---|---|---|
AddReferences ( int amount ) : void |
If this Msg is of MsgType.Pool, then - add the given amount number to the reference-counter and set the shared-data Flags bit. If this is not a Pool Msg, this does nothing.
|
|
CloneData ( ) : byte[] |
Returns a new array containing the first Size bytes of Data.
|
|
Close ( ) : void |
Clear the Data and set the MsgType to Invalid. If this is not a shared-data Msg (MsgFlags.Shared is not set), or it is shared but the reference-counter has dropped to zero, then return the data back to the BufferPool.
|
|
Copy ( |
Close this Msg, and effectively make this Msg a copy of the given source Msg by simply setting it to point to the given source Msg. If this is a Pool Msg, then this also increases the reference-counter and sets the Shared bit.
|
|
InitDelimiter ( ) : void |
Set this Msg to be of type MsgType.Delimiter with no bits set within MsgFlags.
|
|
InitEmpty ( ) : void |
Clear this Msg to empty - ie, set MsgFlags to None, MsgType to Empty, and clear the Data.
|
|
InitGC ( [ data, int size ) : void |
Initialise this Msg to be of MsgType.GC with the given data-buffer value.
|
|
InitGC ( [ data, int offset, int size ) : void |
Initialise this Msg to be of MsgType.GC with the given data-buffer value.
|
|
InitPool ( int size ) : void |
Initialise this Msg to be of MsgType.Pool, with a data-buffer of the given number of bytes.
|
|
Move ( |
Close this Msg and make it reference the given source Msg, and then clear the Msg to empty.
|
|
Put ( [ src, int i, int len ) : void |
Copy the given byte-array data to this Msg's Data buffer.
|
|
Put ( [ src, int srcOffset, int i, int len ) : void |
Copy the given byte-array data to this Msg's Data buffer.
|
|
Put ( byte b ) : void |
Copy the given single byte to this Msg's Data buffer.
|
|
Put ( byte b, int i ) : void |
Copy the given single byte to this Msg's Data buffer at the given array-index.
|
|
RemoveReferences ( int amount ) : void |
If this Msg is of MsgType.Pool and is marked as Shared, then - subtract the given amount number from the reference-counter and, if that reaches zero - return the data to the shared-data pool. If this is not both a Pool Msg and also marked as Shared, this simply Closes this Msg.
|
|
ResetFlags ( MsgFlags flags ) : void |
Clear the indicated Flags bits.
|
|
SetFlags ( MsgFlags flags ) : void |
Set the indicated Flags bits.
|
|
ToString ( ) : string |
Override the Object ToString method to show the object-type, and values of the MsgType, Size, and Flags properties.
|
|
TrimPrefix ( int count ) : void |
Increase Offset and decrease Size by the given count.
|
|
this ( int index ) : byte |
Get and set the byte value in the Data buffer at a specific index.
|
메소드 | 설명 | |
---|---|---|
Check ( ) : bool |
public AddReferences ( int amount ) : void | ||
amount | int | the number to add to the internal reference-counter |
리턴 | void |
public InitGC ( [ data, int size ) : void | ||
data | [ | the byte-array of data to assign to the Msg's Data property |
size | int | the number of bytes that are in the data byte-array |
리턴 | void |
public InitGC ( [ data, int offset, int size ) : void | ||
data | [ | the byte-array of data to assign to the Msg's Data property |
offset | int | first byte in the data array |
size | int | the number of bytes that are in the data byte-array |
리턴 | void |
public InitPool ( int size ) : void | ||
size | int | the number of bytes to allocate in the data-buffer |
리턴 | void |
public Put ( [ src, int i, int len ) : void | ||
src | [ | the source byte-array to copy from |
i | int | index within the internal Data array to copy that byte to |
len | int | the number of bytes to copy |
리턴 | void |
public Put ( [ src, int srcOffset, int i, int len ) : void | ||
src | [ | the source byte-array to copy from |
srcOffset | int | first byte in the source byte-array |
i | int | index within the internal Data array to copy that byte to |
len | int | the number of bytes to copy |
리턴 | void |
public Put ( byte b, int i ) : void | ||
b | byte | the source byte to copy from |
i | int | index within the internal Data array to copy that byte to |
리턴 | void |
public RemoveReferences ( int amount ) : void | ||
amount | int | the number to subtract from the internal reference-counter |
리턴 | void |
public ResetFlags ( MsgFlags flags ) : void | ||
flags | MsgFlags | which Flags bits to clear (More, Identity, or Shared) |
리턴 | void |
public SetFlags ( MsgFlags flags ) : void | ||
flags | MsgFlags | which Flags bits to set (More, Identity, or Shared) |
리턴 | void |
public TrimPrefix ( int count ) : void | ||
count | int | Number of bytes to remove from a message |
리턴 | void |