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 GPRSInterface by
TCPSocketServer Class Reference
TCP Server. More...
#include <TCPSocketServer.h>
Inherits Socket.
Public Member Functions | |
| TCPSocketServer () | |
| Instantiate a TCP Server. | |
| int | bind (int port) |
| Bind a socket to a specific port. | |
| int | listen (int backlog=1) |
| Start listening for incoming connections. | |
| int | accept (TCPSocketConnection &connection) |
| Accept a new connection. | |
| int | close () |
| Close the socket file descriptor. | |
Detailed Description
TCP Server.
Definition at line 30 of file TCPSocketServer.h.
Constructor & Destructor Documentation
| TCPSocketServer | ( | ) |
Instantiate a TCP Server.
Member Function Documentation
| int accept | ( | TCPSocketConnection & | connection ) |
Accept a new connection.
- Parameters:
-
connection A TCPSocketConnection instance that will handle the incoming connection.
- Returns:
- 0 on success, -1 on failure.
| int bind | ( | int | port ) |
Bind a socket to a specific port.
- Parameters:
-
port The port to listen for incoming connections on.
- Returns:
- 0 on success, -1 on failure.
| int close | ( | ) | [inherited] |
Close the socket file descriptor.
Definition at line 37 of file Socket.cpp.
| int listen | ( | int | backlog = 1 ) |
Start listening for incoming connections.
- Parameters:
-
backlog number of pending connections that can be queued up at any one time [Default: 1].
- Returns:
- 0 on success, -1 on failure.
Generated on Tue Jul 12 2022 18:52:23 by
1.7.2