24 #include "netsocket/InternetSocket.h" 27 #include "rtos/EventFlags.h" 51 "The TCPSocket(S *stack) constructor is deprecated." 52 "It discards the open() call return value." 53 "Use another constructor and call open() explicitly, instead.")
191 virtual nsapi_protocol_t get_proto();
nsapi_error_t open(NetworkStack *stack)
Open a network socket on the network stack of the given network interface.
virtual TCPSocket * accept(nsapi_error_t *error=NULL)
Accepts a connection on a socket.
Socket implementation that uses IP network stack.
virtual nsapi_size_or_error_t send(const void *data, nsapi_size_t size)
Send data over a TCP socket.
virtual nsapi_error_t listen(int backlog=1)
Listen for incoming connections.
virtual nsapi_size_or_error_t recv(void *data, nsapi_size_t size)
Receive data over a TCP socket.
Network Interface base class.
void * nsapi_socket_t
Opaque handle for network sockets.
virtual ~TCPSocket()
Destroy a socket.
signed int nsapi_error_t
Type used to represent error codes.
virtual nsapi_size_or_error_t recvfrom(SocketAddress *address, void *data, nsapi_size_t size)
Receive a data from a socket.
TCPSocket()
Create an uninitialized socket.
virtual int join_multicast_group(const SocketAddress &address)
Override multicast functions to return error for TCP.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
virtual nsapi_size_or_error_t sendto(const SocketAddress &address, const void *data, nsapi_size_t size)
Send data on a socket.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
nsapi_error_t connect(const char *host, uint16_t port)
Connects TCP socket to a remote host.