Example #1
0
 /// <summary>
 /// Writes the specified bytes to the buffer
 /// </summary>
 /// <param name="bytes">The bytes.</param>
 public void WriteBytes(byte[] bytes)
 {
     PreWrite();
     NetBufferIO.WriteBytes(bytes, ref data, ref position, 0, bytes.Length);
     AfterWrite();
 }
Example #2
0
 /// <summary>
 /// Writes the specified bytes to the buffer.
 /// </summary>
 /// <param name="bytes">The bytes to write.</param>
 /// <param name="offset">The offset to start from in the bytes to write.</param>
 /// <param name="readSize">The length to write from the bytes to the buffer.</param>
 public void WriteBytes(byte[] bytes, int offset, int readSize)
 {
     PreWrite();
     NetBufferIO.WriteBytes(bytes, ref data, ref position, offset, readSize);
     AfterWrite();
 }
Example #3
0
 /// <summary>
 /// Writes a signed byte to the buffer.
 /// </summary>
 /// <param name="value">The signed byte.</param>
 public void Write(sbyte value)
 {
     PreWrite();
     NetBufferIO.WriteBytes(BitConverter.GetBytes(value), ref data, ref position, 0, -1);
     AfterWrite();
 }