Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Socket by
Diff: TCPSocketConnection.h
- Revision:
- 11:3d83c348fb8b
- Parent:
- 10:d24738f4ef99
- Child:
- 12:8867c9da3b08
--- a/TCPSocketConnection.h Tue Jul 31 11:50:55 2012 +0000
+++ b/TCPSocketConnection.h Wed Aug 01 13:02:32 2012 +0000
@@ -33,8 +33,6 @@
*/
TCPSocketConnection();
- ~TCPSocketConnection();
-
/** Connects this TCP socket to the server
\param host The host to connect to. It can either be an IP Address or a hostname that will be resolved with DNS.
\param port The host's port to connect to.
@@ -42,6 +40,11 @@
*/
int connect(const char* host, const int port);
+ /** Check if the socket is connected
+ \return true if connected, false otherwise.
+ */
+ bool is_connected(void);
+
/** Send data to the remote host.
\param data The buffer to send to the host.
\param length The length of the buffer to send.
@@ -71,7 +74,7 @@
int receive_all(char* data, int length);
private:
- bool _closedByRemoteHost;
+ bool _is_connected;
};
