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.
Dependents: HelloESP8266Interface_mine
Fork of NetworkSocketAPI by
Endpoint Class Reference
Base class that defines an endpoint (TCP/UDP/Server/Client Socket) More...
#include <SocketInterface.h>
Inherited by SocketInterface.
Public Member Functions | |
| virtual const char * | getHostByName (const char *name) const =0 |
| Get the ip address of a host by DNS lookup. | |
| virtual void | setAddress (const char *addr)=0 |
| Set the address of this endpoint. | |
| virtual void | setPort (uint16_t port)=0 |
| Set the port of this endpoint. | |
| virtual void | setAddressPort (const char *addr, uint16_t port)=0 |
| Set the address and port of this endpoint. | |
| virtual const char * | getAddress (void) const =0 |
| Get the IP address of this endpoint. | |
| virtual uint16_t | getPort (void) const =0 |
| Get the port of this endpoint. | |
Detailed Description
Base class that defines an endpoint (TCP/UDP/Server/Client Socket)
Definition at line 47 of file SocketInterface.h.
Member Function Documentation
| virtual const char* getAddress | ( | void | ) | const [pure virtual] |
Get the IP address of this endpoint.
- Returns:
- The IP address of this endpoint.
| virtual const char* getHostByName | ( | const char * | name ) | const [pure virtual] |
Get the ip address of a host by DNS lookup.
- Parameters:
-
name The name of a host you need an ip address for
- Returns:
- The ip address of the host otherwise NULL
| virtual uint16_t getPort | ( | void | ) | const [pure virtual] |
Get the port of this endpoint.
- Returns:
- The port of this socket
| virtual void setAddress | ( | const char * | addr ) | [pure virtual] |
Set the address of this endpoint.
- Parameters:
-
addr The endpoint address
- Returns:
- 0 on success, -1 on failure (when an hostname cannot be resolved by DNS).
| virtual void setAddressPort | ( | const char * | addr, |
| uint16_t | port | ||
| ) | [pure virtual] |
Set the address and port of this endpoint.
- Parameters:
-
addr The endpoint address (supplied as an ip address). port The endpoint port
- Returns:
- 0 on success, -1 on failure (when an hostname cannot be resolved by DNS).
| virtual void setPort | ( | uint16_t | port ) | [pure virtual] |
Set the port of this endpoint.
- Parameters:
-
port The endpoint port
- Returns:
- 0 on success, -1 on failure (when an hostname cannot be resolved by DNS).
Generated on Tue Jul 12 2022 18:45:36 by
1.7.2
