/// <summary>
 ///   <para>Creates a new NetworkWriter object.</para>
 /// </summary>
 /// <param name="buffer">A buffer to write into. This is not copied.</param>
 public NetworkWriter(byte[] buffer)
 {
   this.m_Buffer = new NetBuffer(buffer);
   if (NetworkWriter.s_Encoding != null)
     return;
   NetworkWriter.s_Encoding = (Encoding) new UTF8Encoding();
   NetworkWriter.s_StringWriteBuffer = new byte[32768];
 }
 /// <summary>
 /// <para>Creates a new NetworkWriter object.</para>
 /// </summary>
 /// <param name="buffer">A buffer to write into. This is not copied.</param>
 public NetworkWriter(byte[] buffer)
 {
     this.m_Buffer = new NetBuffer(buffer);
     if (s_Encoding == null)
     {
         s_Encoding = new UTF8Encoding();
         s_StringWriteBuffer = new byte[0x8000];
     }
 }
Example #3
0
 public NetworkReader(NetworkWriter writer)
 {
     m_buf = new NetBuffer(writer.AsArray());
     Initialize();
 }
Example #4
0
 public NetworkReader(byte[] buffer)
 {
     m_buf = new NetBuffer(buffer);
     Initialize();
 }
Example #5
0
 public NetworkReader()
 {
     m_buf = new NetBuffer();
     Initialize();
 }