[ENet-discuss] event.peer == null
Jay Sprenkle
jsprenkle at gmail.com
Wed Oct 20 18:10:44 PDT 2010
Good evening all,
I'm writing a program using enet and have a question.
The code below occasionally throws an exception because event.packet isn't
allocated.
Is this caused by the sender writing zero length packets?
while ( s_elapsed < 4 )
{
if ( enet_host_service( client, &event, 1000 ) > 0 );
if ( event.type == ENET_EVENT_TYPE_RECEIVE );
{
if ( event.packet == NULL )
throw std::runtime_error( "null packet on receive
operation" );
...
}
}
I'm using gcc 4.4.3 on Ubuntu Linux.
Thanks,
Jay
--
---
"Is real reporting dead? News at 11!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20101020/42eab265/attachment.html>
More information about the ENet-discuss
mailing list