[ENet-discuss] Problem with Client connection

Milan Sanger milan.sanger at hotmail.de
Sun Jun 8 05:55:33 PDT 2014


Hello guys,

i have a Problem when Iā€™m trying to connect to my enet Server which works fine.

If I try to connect to my server i always get ā€œ
Error receiving incoming packets: No Error
ā€



Version 1.2.5


My Source:


#define SERVER_HOST ENET_HOST_ANY 

#define CLIENT_HOST "192.168.178.19" 

#define PORT 5119


ENetAddress address;

	enet_address_set_host (& address, CLIENT_HOST);

	address.port = PORT;


if (enet_initialize () != 0)

	return false;

atexit(enet_deinitialize);

	_client = enet_host_create(NULL, 1, 0, 0);

	if(_client == NULL)

	return false;

	_peer = enet_host_connect (_client, address, 0);

	if(_peer == NULL)

	return false

;




ENetEvent event;



if (enet_host_service (_client, & event, 5000) >= 0 &&



event.type == ENET_EVENT_TYPE_CONNECT)





{




	puts ("Connection to some.server.net:1234 succeeded.");





}




	else





{




	/* Either the 5 seconds are up or a disconnect event was */



/* received. Reset the peer in the event the 5 seconds */



/* had run out without any significant event. */





enet_peer_reset (_peer);




	puts ("Connection to some.server.net:1234 failed.");





}




I hope that you can help me.

Thanks in advance.

Milsan Sanger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20140608/d4af235e/attachment.html>


More information about the ENet-discuss mailing list