Socket.isConnected
From Spheriki
Checks if the socket is connected.
Contents |
[edit]
Usage
boolean Socket.isConnected();
- Socket Sphere Socket object to check connection of.
- boolean is returned, true if the socket is connected, false otherwise.
[edit]
Examples
See examples for ListenOnPort() and OpenAddress().
[edit]
Notes
- If a socket is connected, it means that data can be sent to and receieved from it, using the Socket.write() and Socket.read() functions respectively.
- This function is important to ensure that a connection has been established before you try to use the socket. See the examples for how this can be done.
[edit]
See also
- Sphere Socket object

