(server-app)getpeer only updates when the program sends data (*tcp() << "..."). i want to find out, if the socket is connected, but when i call getpeer without having send data (when the client already disconnected), it shows me the client's address, and not 0.0.0.0 (which would be the right result)
i hope you can help me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a "isConnected" method, but this is based on the setting of the state variable in the obect, and is not in itself an absolute proof of connection. Let me think about this more...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(server-app)getpeer only updates when the program sends data (*tcp() << "..."). i want to find out, if the socket is connected, but when i call getpeer without having send data (when the client already disconnected), it shows me the client's address, and not 0.0.0.0 (which would be the right result)
i hope you can help me
There is a "isConnected" method, but this is based on the setting of the state variable in the obect, and is not in itself an absolute proof of connection. Let me think about this more...