[ENet-discuss] enet_host_connect and the data parameter

czj issingle at gmail.com
Fri Oct 15 17:52:53 PDT 2010


uh...the data can be everything.


2010-10-16 



czj 



发件人: enet-discuss-request 
发送时间: 2010-10-16  03:00:52 
收件人: enet-discuss 
抄送: 
主题: ENet-discuss Digest, Vol 89, Issue 6 
 
Send ENet-discuss mailing list submissions to
enet-discuss at cubik.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.cubik.org/mailman/listinfo/enet-discuss
or, via email, send a message with subject or body 'help' to
enet-discuss-request at cubik.org
You can reach the person managing the list at
enet-discuss-owner at cubik.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of ENet-discuss digest..."
Today's Topics:
   1.  enet_host_connect and the data parameter. (fuzzy)
----------------------------------------------------------------------
Message: 1
Date: Fri, 15 Oct 2010 13:21:11 +0200
From: fuzzy <fuzzyspoon at gmail.com>
To: enet-discuss at cubik.org
Subject: [ENet-discuss] enet_host_connect and the data parameter.
Message-ID: <4CB83927.9030809 at gmail.com>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
  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-0001.html>
------------------------------
_______________________________________________
ENet-discuss mailing list
ENet-discuss at cubik.org
http://lists.cubik.org/mailman/listinfo/enet-discuss
End of ENet-discuss Digest, Vol 89, Issue 6
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20101016/f0e44e8c/attachment.html>


More information about the ENet-discuss mailing list