[ENet-discuss] ENet on iPhone and dropped packets?

Emil Salling emils at me.com
Mon Jan 10 13:11:30 PST 2011


Hi Im trying ENet (1.3) to communicate iPhone to/with desktop (os x).

Ive encountered a few problems.
The server, which resides on the desktop side, drops alot (less than half get through) of the packets sent from the client(iphone).

The server code works fine when connected from a client located on the same machine, making me think that maybe I had problems with my WLAN.
Tried with two different basestations but the problem persits.

What puzzels me is that I have no problem connecting but it is when I send data that the packets dont get through. I have tried both reliable and unreliable send package types and
when sending unreliable I just get data occasionally and when sending reliable
I get all data at once with 0.1->5 second intervalls. Ie it seems to be the same problem regardless of sendtype.

Puzzle two. At server side when I check for totalNbOfReceivedPackets I see all failed packets, even though my runloop polling ENet hasnt caught any data received. What can be the cause of this?

Anyone else used ENet on iPhone noticed any such problems?

Any special settings needed to be applied when compiling ENet for iPhone?

Best regards
/emil

Skickat från min iPhone

4 jan 2011 kl. 21:00 skrev enet-discuss-request at cubik.org:

> 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. Re:  Waiting for host. (Nuno Silva)
>   2. Re:  Waiting for host. (???????? ?????????)
>   3. Re:  Waiting for host. (Nuno Silva)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 4 Jan 2011 18:13:27 +0000
> From: Nuno Silva <little.coding.fox at gmail.com>
> To: Discussion of the ENet library <enet-discuss at cubik.org>
> Subject: Re: [ENet-discuss] Waiting for host.
> Message-ID:
>    <AANLkTim5xhPW5RMF=PShc8-WTMspfidDqZE-_7OPqqs1 at mail.gmail.com>
> Content-Type: text/plain; charset="koi8-r"
> 
> Or enet_host_connect(), since it is obviously a new connection attempt and
> as such the previously allocated peer has no point in existence :)
> 
> 2011/1/4 Jay Sprenkle <jsprenkle at gmail.com>
> 
>> If you look at enet_host_connect() source you see it returns a peer from
>> ENetHost.
>> You don't need to delete the peer, the call to enet_host_destroy() will do
>> that.
>> 
>> 
>> 2011/1/4 ???????? ????????? <slavmfm at gmail.com>
>> 
>> So, the question is "how to delete (destroy) an ENetPeer?" both for the
>>> garbage collection purpose and to have the opportunity to create new one.
>>> 
>> 
>> 
>> _______________________________________________
>> 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/20110104/fc8bfcde/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 4 Jan 2011 21:27:44 +0300
> From: ???????? ????????? <slavmfm at gmail.com>
> To: Discussion of the ENet library <enet-discuss at cubik.org>
> Subject: Re: [ENet-discuss] Waiting for host.
> Message-ID:
>    <AANLkTikNNri1iD79xr8Q=RZQYZ=qbBeJ17bY9a4k_XU0 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Now everything works fine. Thank you!
> 
> P.S. I put code
> 
>    const char* url    = "localhost";
>>    const int port    = 1301;
>> 
>>    ENetAddress address;
>>    /* Connect to url:port. */
>>    enet_address_set_host(&address, url);
>>    address.port    = port;
>> 
> before all connections attempts - is it right - it not it need to recreate
> ENetAddress after each unsuccessfull connection attempt?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20110104/ea5442f4/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 4 Jan 2011 18:38:29 +0000
> From: Nuno Silva <little.coding.fox at gmail.com>
> To: Discussion of the ENet library <enet-discuss at cubik.org>
> Subject: Re: [ENet-discuss] Waiting for host.
> Message-ID:
>    <AANLkTin0CSU0_pZH_MV5Cd=F6aB9D6ysqVr_5O9YwHzh at mail.gmail.com>
> Content-Type: text/plain; charset="koi8-r"
> 
> It seems to be right. If it works for you, you dont need to recreate the
> address.
> 
> 2011/1/4 ???????? ????????? <slavmfm at gmail.com>
> 
>> Now everything works fine. Thank you!
>> 
>> P.S. I put code
>> 
>> 
>>    const char* url    = "localhost";
>>>    const int port    = 1301;
>>> 
>>>    ENetAddress address;
>>>    /* Connect to url:port. */
>>>    enet_address_set_host(&address, url);
>>>    address.port    = port;
>>> 
>> before all connections attempts - is it right - it not it need to recreate
>> ENetAddress after each unsuccessfull connection attempt?
>> 
>> _______________________________________________
>> 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/20110104/0f6c3f72/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 92, Issue 2
> *******************************************


More information about the ENet-discuss mailing list