[ENet-discuss] Send when not connected.

Lee Salzman lsalzman at gmail.com
Fri Oct 29 11:23:06 PDT 2010


You are doing something very, very wrong somewhere that you are not 
explaining somehow.

I quote from the top of enet_peer_send:

int enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * 
packet)
{
    ...
    if (peer -> state != ENET_PEER_STATE_CONNECTED ||
        channelID >= peer -> channelCount)
      return -1;
    ...
}

Your problem lies elsewhere.

On 10/29/2010 07:41 AM, fuzzy wrote:
> Hi guys,
>
> I already KNOW that your application is best to track its own online 
> and offline status, but I am curious.
>
> Does enet have some sort of internal status for being connected or not 
> in a client / ENetPeer? The reason being -
> If you call for example, enet_peer_send, or broadcast -* It hard 
> crashes.*
>
> Is it a plausible feature that instead of crashing it can ignore the 
> packet and perhaps return a -1,
> print an error, or anything more graceful than a crash? Is it 
> something the internal system can take care
> of or is there a reason for this current behavior?
>
> Thanks!
> Sven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20101029/5c1c8fcb/attachment.html>


More information about the ENet-discuss mailing list