Socket status when client gets disconnected


#1

Hi,

Here in Zerynth code

client,addr = sock.accept()

I am in need to know the status of the client after gets disconnected.

Like here in Arduino code of WifiClient example

while (client.available()) {
char c = client.read();
Serial.write©;
}

How to get that…

Thanks in advance.


#2

Hi

Anyone have the solution to the topic I mentioned earlier

please give me a solution


#3

Hi @Boda_Dinesh_reddy,

checking if the client is disconnected does not assure you that desired state is kept on a subsequent read call, so what I suggest you is to try perform your reading and catch exceptions that might arise from a disconnected client.

Let me know if this helps you :slight_smile:


#4

This gonna help me but is there any other way of watching over the status flags to do this