[ENet-discuss] enet_host_connect and the data parameter.

fuzzy fuzzyspoon at gmail.com
Fri Oct 15 04:21:11 PDT 2010


  Is this parameter only for flags, not data?

For example, when sending packets around to my clients / server i use BSON.
This is simple when building a packet cos i can just do
*enet_packet_create((const void*)objectData , objectDataSize...*

But now, after just porting to 1.3.0 :
enet_host_connect 
<http://enet.bespin.org/group__host.html#g23b3ac206326b84f42fa91673f12fca9> 
adds a *enet_uint32 data* parameter which says " user data supplied to 
the receiving host ".

Maybe i am over tired, but this is for a bitmask/flags option... not 
actual data right?

If i wanted to send the client nickname and client user ID across* on 
connect request* - is that possible?
ENetPeer has a data pointer too, but the connect returns a peer so i 
can't obviously set it in advance.

Thanks,
FuzzYspo0N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20101015/88a2532d/attachment.html>


More information about the ENet-discuss mailing list