sockets - .net - SocketException 10054 -


i writing small udp client-server app. server allows connect more 1 client. send message clients use code:

// ipendpoints - list<ipendpoint> store clients' ipendpoints // packet - byte[] data (int = 0; < ipendpoints.count; ++i)     server.send(packet, packet.length, ipendpoints[i]); 

to recieve messages use this:

//packet - byte[] store data //endpoint - ipendpoint packet = server.receive(ref endpoint); 

but, when 1 of clients closes connection still try send message endpointand socketexception code 10054. question is, how find out client disconnected? how client's ipendpoint remove ipendpoints list? thought ipendpoint stored in endpoint (passed ref), when exception fired, endpoint remains untouched.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -