예제 #1
0
 public void Write(Span <byte> s)
 {
     BitConverter.TryWriteBytes(s, TileSizeBytes);
     BitConverter.TryWriteBytes(s.Slice(2), MaxBeamedTilesAtOnce);
     BitConverter.TryWriteBytes(s.Slice(6), MaxConcurrentReceives);
     BitConverter.TryWriteBytes(s.Slice(10), SendBufferSize);
     BitConverter.TryWriteBytes(s.Slice(14), ReceiveBufferSize);
     IP.AsSpan().CopyTo(s.Slice(18));
     BitConverter.TryWriteBytes(s.Slice(34), Port);
     BitConverter.TryWriteBytes(s.Slice(36), IsIPv4);
 }