38#ifndef _FREERTOS_DRIVERS_NET_CC32XX_CC32XXSOCKET_HXX_
39#define _FREERTOS_DRIVERS_NET_CC32XX_CC32XXSOCKET_HXX_
59 static int socket(
int domain,
int type,
int protocol);
123 static ssize_t
recv(
int socket,
void *buffer,
size_t length,
int flags);
133 static ssize_t
send(
int socket,
const void *buffer,
size_t length,
147 const void *option_value,
socklen_t option_len);
160 void *option_value,
socklen_t *option_len);
191 int fcntl(
File *file,
int cmd,
unsigned long data)
override;
Socket implementation for the CC32xx class WiFi devices.
int16_t sd
CC32xx socket descriptor.
static int reserve_socket()
Reserve a location in the cc32xxSockets pool.
bool select(File *file, int mode) override
Device select method.
static CC32xxSocket * get_instance_from_fd(int fd)
Get the CC32xxSocket instance given a file descriptor.
static int connect(int socket, const struct sockaddr *address, socklen_t address_len)
Connect a socket.
uint8_t readActive
indicates our "best guess" at current socket's read active status
static int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len)
Set the socket options.
static int getsockopt(int socket, int level, int option_name, void *option_value, socklen_t *option_len)
Get the socket options.
uint8_t listenActive
This is a listen socket.
int fcntl(File *file, int cmd, unsigned long data) override
Manipulate a file descriptor.
static int bind(int socket, const struct sockaddr *address, socklen_t address_len)
Bind a name to a socket.
~CC32xxSocket()
Destructor.
static CC32xxSocket * get_instance_from_sd(int sd)
Get the CC32xxSocket instance given a specific CC32xx socket descriptor.
CC32xxSocket()
Constructor.
static int listen(int socket, int backlog)
Mark a connection-mode socket, specified by the socket argument, as accepting connections.
static void remove_instance_from_sd(int sd)
Remove the CC32xxSocket instance from the active CC32xxSocket list.
static int socket(int domain, int type, int protocol)
Create an unbound socket in a communications domain.
int close(File *file) override
Close method.
static int accept(int socket, struct sockaddr *address, socklen_t *address_len)
Accept a new connection on a socket.
static ssize_t send(int socket, const void *buffer, size_t length, int flags)
Initiate transmission of a message from the specified socket.
uint8_t writeActive
indicates our "best guess" at current socket's write active status
static ssize_t recv(int socket, void *buffer, size_t length, int flags)
Receive a message from a connection-mode or connectionless-mode socket.
Provides the startup and mantainance methods for configuring and using the CC32xx Wi-Fi stack.
Implement a BSD compatible socket device.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
uint32_t socklen_t
type of sockaddr lenth