[ENet-discuss] How can I get the client port created in my client side

Daniel Aquino mr.danielaquino at gmail.com
Wed Jul 11 11:49:40 PDT 2012


You can find out that information from enet_host->socket.


On Wed, Jul 11, 2012 at 9:04 AM, Soren Dreijer <dreijer at echobit.net> wrote:

> You’re using UDP and you therefore don’t have separate client-side ports
> when you “connect” to a server.****
>
> ** **
>
> The port you’re using on the client is the one you specified in
> enet_host_create() when you initialized enet.****
>
> ** **
>
> *From:* enet-discuss-bounces at cubik.org [mailto:
> enet-discuss-bounces at cubik.org] *On Behalf Of *Siqi Shen
> *Sent:* Wednesday, July 11, 2012 6:49 AM
> *To:* enet-discuss at cubik.org
> *Subject:* [ENet-discuss] How can I get the client port created in my
> client side****
>
> ** **
>
> Hi All, ****
>
> ** **
>
> I am developing a small game using enet as network layer. My question is
> that how can I know the port I created in my client side to connect to
> remote host. I know that I can know the client's port in server's side when
> ENET_EVENT_TYPE_CONNECT receive; but I can not get the port when I use
> enet_host_create or enet_host_connect or ENET_EVENT_TYPE_CONNECT receive in
> client's side. Anyone know how to deal with this problem? ****
>
> ** **
>
> Thanks and best regards,****
>
> Siqi****
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20120711/7be08d1a/attachment.html>


More information about the ENet-discuss mailing list