Browse Source

Quality of life update.

Matt Coburn 5 years ago
parent
commit
0d42922473
3 changed files with 584 additions and 595 deletions
  1. 1 0
      .gitignore
  2. 7 3
      DOCUMENTATION.md
  3. 576 592
      Source/Native/enet.h

+ 1 - 0
.gitignore

@@ -12,3 +12,4 @@ deps/
 x86_Build/
 x86_Build/
 UpgradeLog.htm
 UpgradeLog.htm
 NEW_DO_NOT_SEND_TO_GIT/
 NEW_DO_NOT_SEND_TO_GIT/
+out/

+ 7 - 3
DOCUMENTATION.md

@@ -51,11 +51,15 @@ Definitions of peer states for `Peer.State` property:
 ### Delegates
 ### Delegates
 #### Memory callbacks
 #### Memory callbacks
 
 
-No longer available in this fork.
+`AllocCallback(IntPtr size)` notifies when a memory is requested for allocation. Expects pointer to the newly allocated memory. A reference to the delegate should be preserved from being garbage collected.
+
+`FreeCallback(IntPtr memory)` notifies when the memory can be freed. A reference to the delegate should be preserved from being garbage collected.
+
+`NoMemoryCallback()` notifies when memory is not enough. A reference to the delegate should be preserved from being garbage collected.
 
 
 #### Packet callbacks
 #### Packet callbacks
 
 
-No longer available in this fork.
+`PacketFreeCallback(Packet packet)` notifies when a packet is being destroyed. A reference to the delegate should be preserved from being garbage collected.
 
 
 ### Structures
 ### Structures
 #### Address
 #### Address
@@ -110,7 +114,7 @@ Contains a managed pointer to the peer and cached ID.
 
 
 `Peer.IsSet` returns a state of the managed pointer.
 `Peer.IsSet` returns a state of the managed pointer.
 
 
-`Peer.ID` returns a peer ID.
+`Peer.ID` returns a peer ID. It's always zero on the client side.
 
 
 `Peer.IP` returns an IP address in a printable form.
 `Peer.IP` returns an IP address in a printable form.
 
 

File diff suppressed because it is too large
+ 576 - 592
Source/Native/enet.h


Some files were not shown because too many files changed in this diff