[ENet-discuss] Help! Questions about using enet in a gameserver.

张鹏飞 zhangpengfei at red-infinity.com
Mon Jun 4 20:26:03 PDT 2012


Hi,

We are developing a fps game server, and trying to use enet.  There are some questions that I can't find any clue in enet document or google. I really need your help.

Does server need to store all ENetPeer  objects in  "ENET_EVENT_TYPE_CONNECT" event, so that server can send packet to any client?
If so, what's the life cycle of a ENetPeer object? Will enet delete this object itself after event "ENET_EVENT_TYPE_DISCONNECT"  occurred, or I should delete it in my code?
If it will be deleted automatically, is there any way that I can know this? Otherwise the pointer to the ENetPeer  object I stored become a wild pointer.

I've know how to use enet in the simplest way after read the tutorial,  but it's far from enough to implement a real server.  
If there is some sample code of server side, or detailed document, it will help very much.

Any suggestion is appreciated!

Thanks,
Kevin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20120605/058ebfac/attachment.html>


More information about the ENet-discuss mailing list