a library to use GPRS like ethernet or wifi, which makes it possible to connect to the internet with your GPRS module

Dependencies:   BufferedSerial

Dependents:   ThinkSpeak_Test roam_v1 roam_v2 finalv3

Fork of GPRSInterface by wei zou

Embed: (wiki syntax)

« Back to documentation index

TCPSocketServer Class Reference

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

Instantiate a TCP Server.


Member Function Documentation

int accept ( TCPSocketConnection connection )

Accept a new connection.

Parameters:
connectionA 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:
portThe 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:
backlognumber of pending connections that can be queued up at any one time [Default: 1].
Returns:
0 on success, -1 on failure.