25#include "netsocket/InternetSocket.h"
28#include "rtos/EventFlags.h"
197 nsapi_protocol_t get_proto()
override;
Network Interface base class.
Socket implementation that uses IP network stack.
nsapi_size_or_error_t send(const void *data, nsapi_size_t size) override
Send data over a TCP socket.
nsapi_size_or_error_t sendto_control(const SocketAddress &address, const void *data, nsapi_size_t size, nsapi_msghdr_t *control, nsapi_size_t control_size) override
Send data on a packet with ancillary datasocket.
nsapi_error_t connect(const SocketAddress &address) override
Connects TCP socket to a remote host.
nsapi_error_t listen(int backlog=1) override
Listen for incoming connections.
TCPSocket()
Create an uninitialized socket.
nsapi_size_or_error_t sendto(const SocketAddress &address, const void *data, nsapi_size_t size) override
Send data on a socket.
int join_multicast_group(const SocketAddress &address)
Override multicast functions to return error for TCP.
nsapi_size_or_error_t recvfrom_control(SocketAddress *address, void *data, nsapi_size_t size, nsapi_msghdr_t *control, nsapi_size_t control_size) override
Receive a packet with ancillary data from a socket.
nsapi_size_or_error_t recv(void *data, nsapi_size_t size) override
Receive data over a TCP socket.
nsapi_size_or_error_t recvfrom(SocketAddress *address, void *data, nsapi_size_t size) override
Receive a data from a socket.
TCPSocket * accept(nsapi_error_t *error=NULL) override
Accepts a connection on a socket.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
signed int nsapi_error_t
Type used to represent error codes.
void * nsapi_socket_t
Opaque handle for network sockets.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
@ NSAPI_ERROR_UNSUPPORTED
Header structure for control info.