Browse Source

Update README.md

nxrighthere 7 years ago
parent
commit
43f492648c
1 changed files with 7 additions and 0 deletions
  1. 7 0
      README.md

+ 7 - 0
README.md

@@ -121,6 +121,13 @@ packet.Create(data);
 peer.Send(channelID, ref packet);
 ```
 
+##### Copy payload from a packet:
+```csharp
+byte[] buffer = new byte[1024];
+
+netEvent.Packet.CopyTo(buffer);
+```
+
 ##### Integrate with a custom memory allocator:
 ```csharp
 AllocCallback OnMemoryAllocate = (size) => {