public static NetMessage PrepareThreadInstance(int size)
 {
     if (threadInstance == null || threadInstance.buf.Length < size)
     {
         threadInstance = new NetMessage (size);
     }
     else
     {
         threadInstance.sink.Position = 0;
         threadInstance.lenAt = 0;
     }
     return threadInstance;
 }
 public static NetMessage PrepareThreadInstance()
 {
     if (threadInstance == null)
     {
         threadInstance = new NetMessage (65535);
     }
     else
     {
         threadInstance.sink.Position = 0;
         threadInstance.lenAt = 0;
     }
     return threadInstance;
 }