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: Endpoint.h
- Revision:
- 8:9cf9c2d45264
- Parent:
- 5:300e7ad2dc1d
diff -r ac5f77f4497a -r 9cf9c2d45264 Endpoint.h
--- a/Endpoint.h Fri Jul 27 14:22:45 2012 +0000
+++ b/Endpoint.h Fri Jul 27 15:50:23 2012 +0000
@@ -18,18 +18,38 @@
#ifndef ENDPOINT_H
#define ENDPOINT_H
+/**
+IP Endpoint (address, port)
+*/
class Endpoint {
public:
+ /** IP Endpoint (address, port)
+ */
Endpoint(void);
~Endpoint(void);
+ /** Reset the address of this endpoint
+ */
void reset_address(void);
+
+ /** Set the address of this endpoint
+ \param host The endpoint address (it can either be an IP Address or a hostname that will be resolved with DNS).
+ \param port The endpoint port
+ \return 0 on success, -1 on failure (when an hostname cannot be resolved by DNS).
+ */
int set_address(const char* host, const int port);
+ /** Get the IP address of this endpoint
+ \return The IP address of this endpoint.
+ */
char* get_address(void);
- int get_port(void);
+
+ /** Get the port of this endpoint
+ \return The port of this endpoint
+ */
+ int get_port(void);
protected:
char _ipAddress[16];
