some tutorial cleanups

This commit is contained in:
eihrul 2004-11-23 21:16:51 +00:00
parent 49414930c5
commit 9935790800

View file

@ -233,10 +233,10 @@ dispatching any events.
enet_packet_resize (packet, strlen ("packetfoo") + 1); enet_packet_resize (packet, strlen ("packetfoo") + 1);
strcpy (& packet -> data [strlen ("packet")], "foo"); strcpy (& packet -> data [strlen ("packet")], "foo");
/* Send the packet to the peer over channel id 3. */ /* Send the packet to the peer over channel id 0. */
/* One could also broadcast the packet by */ /* One could also broadcast the packet by */
/* enet_host_broadcast (host, 3, packet); */ /* enet_host_broadcast (host, 0, packet); */
enet_peer_send (peer, 3, packet); enet_peer_send (peer, 0, packet);
... ...
... ...
... ...
@ -262,7 +262,7 @@ foreign host. No event is generated.
@code @code
ENetEvent event; ENetEvent event;
enet_peer_disconnect (& client -> peers [0]); enet_peer_disconnect (peer);
/* Allow up to 3 seconds for the disconnect to succeed /* Allow up to 3 seconds for the disconnect to succeed
* and drop any packets received packets. * and drop any packets received packets.
@ -286,7 +286,7 @@ foreign host. No event is generated.
/* We've arrived here, so the disconnect attempt didn't */ /* We've arrived here, so the disconnect attempt didn't */
/* succeed yet. Force the connection down. */ /* succeed yet. Force the connection down. */
enet_peer_reset (& client -> peers [0]); enet_peer_reset (peer);
... ...
... ...
... ...