in my project requires to listening about 3 port at same time for difference busniess , but for enet demo code:
once i established a server by
ENetHost* create server(int port){
ENetAddress* addr;
addr->host=.....
addr->port=port;
server=p2udp_host_create(&serv_addr,MAX_CLIENT_LINKS,MAX_CHANNEL_SET,0,0);
????
return server;
}
than i call this function 3 times so i got about 3 server instance with 3 different ports, but only 1 port can handle events which was first made.
so the question is how can i handle the message events for all of 3 ports because event handling procedure is in located a while loop just like:
service_event_handle(ENetHost* server)
{
ENETEVENET event;
while(1){
switch(.....){
}
}
}
when i pass the params server1 create by , it just traped in loop without ending conditions
i wonder how can i jump the loop do handle evnets for another 2 port
,