[ENet-discuss] [patch] Add a warning paragraph to the potentially dangerous disconnection example.

Adam D. Moss adam at gimp.org
Tue Nov 23 08:52:13 PST 2004


I think this is right/helpful...
--Adam
-------------- next part --------------
Index: vendor/enet/docs/tutorial.dox
===================================================================
--- vendor/enet/docs/tutorial.dox	(revision 3107)
+++ vendor/enet/docs/tutorial.dox	(working copy)
@@ -292,6 +292,10 @@
     ...
 @endcode
 
+Note that in the above example, client->peers[0] is assumed to be
+the client's only peer (otherwise this code will throw away packets
+received by other peers while waiting for the disconnect!).
+
 @section Connecting Connecting to an ENet host
 
 A connection to a foreign host is initiated with enet_host_connect().


More information about the ENet-discuss mailing list