25 #include "netsocket/InternetSocket.h" 28 #include "rtos/EventFlags.h" 228 nsapi_protocol_t get_proto()
override;
Socket implementation that uses IP network stack.
nsapi_size_or_error_t recvfrom(SocketAddress *address, void *data, nsapi_size_t size) override
Receive a data from a socket.
int join_multicast_group(const SocketAddress &address)
Override multicast functions to return error for TCP.
Network Interface base class.
void * nsapi_socket_t
Opaque handle for network sockets.
signed int nsapi_error_t
Type used to represent error codes.
TCPSocket()
Create an uninitialized socket.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
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.
TCPSocket * accept(nsapi_error_t *error=NULL) override
Accepts a connection on a socket.
nsapi_error_t connect(const SocketAddress &address) override
Connects TCP socket to a remote host.
nsapi_size_or_error_t recv(void *data, nsapi_size_t size) override
Receive data over a TCP socket.
nsapi_size_or_error_t sendto(const SocketAddress &address, const void *data, nsapi_size_t size) override
Send data on a socket.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
nsapi_error_t listen(int backlog=1) override
Listen for incoming connections.
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.