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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -