Menu

#5 ClientSockets dont know state of connection

open
nobody
Network (1)
5
2005-05-21
2005-05-21
No

client socket objects, it seems, havent a clue whether
they are connected, or the server disconnected them,
it's therefore important that they know whether they
are connected or not and when that disconnection
happens, the app needs to know too.

to the client socket must either

a) provide a callback function which it will call in
the event of a disconnection

b) provide a method which can be called to check the
status of the connection, whether it's connected or not

there are no really harmful side effects from not
knowing, if you attempt to send data, it'll fail
(SILENTLY I MIGHT ADD!!!) and if you are disconnected,
it'll never signal you there is data ready, cause well,
there is no connection for a remote computer to send
you data through.

Discussion


Log in to post a comment.