Network socket. More...
#include <cmsis-plus/posix-io/socket.h>
Public Types | |
Types & Constants | |
enum | type : type_t { unknown = 0 , not_set = 1 << 0 , char_device = 1 << 1 , block_device = 1 << 2 , tty = 1 << 3 , file = 1 << 4 , socket = 1 << 5 } |
using | type_t = unsigned int |
Public Member Functions | |
Constructors & Destructor | |
socket (socket_impl &impl, class net_stack &ns) | |
virtual | ~socket () override |
Public Member Functions | |
virtual class socket * | accept (struct sockaddr *address, socklen_t *address_len) |
virtual int | bind (const struct sockaddr *address, socklen_t address_len) |
virtual int | connect (const struct sockaddr *address, socklen_t address_len) |
virtual int | getpeername (struct sockaddr *address, socklen_t *address_len) |
virtual int | getsockname (struct sockaddr *address, socklen_t *address_len) |
virtual int | getsockopt (int level, int option_name, void *option_value, socklen_t *option_len) |
virtual int | listen (int backlog) |
virtual ssize_t | recv (void *buffer, size_t length, int flags) |
virtual ssize_t | recvfrom (void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len) |
virtual ssize_t | recvmsg (struct msghdr *message, int flags) |
virtual ssize_t | send (const void *buffer, size_t length, int flags) |
virtual ssize_t | sendmsg (const struct msghdr *message, int flags) |
virtual ssize_t | sendto (const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len) |
virtual int | setsockopt (int level, int option_name, const void *option_value, socklen_t option_len) |
virtual int | shutdown (int how) |
virtual int | sockatmark (void) |
class net_stack * | net_stack (void) |
socket_impl & | impl (void) const |
Public Member Functions | |
virtual int | close (void) |
virtual ssize_t | read (void *buf, std::size_t nbyte) |
virtual ssize_t | write (const void *buf, std::size_t nbyte) |
virtual ssize_t | writev (const struct iovec *iov, int iovcnt) |
int | fcntl (int cmd,...) |
virtual int | vfcntl (int cmd, std::va_list args) |
int | isatty (void) |
virtual int | fstat (struct stat *buf) |
virtual off_t | lseek (off_t offset, int whence) |
type_t | get_type (void) const |
file_descriptor_t | file_descriptor (void) const |
bool | is_opened (void) |
Protected Member Functions | |
Private Member Functions | |
void | file_descriptor (file_descriptor_t fildes) |
void | clear_file_descriptor (void) |
io * | alloc_file_descriptor (void) |
Network socket.
Definition at line 73 of file posix-io/socket.h.
|
inherited |
|
inherited |
os::posix::socket::socket | ( | socket_impl & | impl, |
class net_stack & | ns | ||
) |
Definition at line 48 of file socket.cpp.
|
overridevirtual |
Definition at line 58 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 70 of file socket.cpp.
|
protectedinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 85 of file socket.cpp.
|
inlineprotectedinherited |
|
virtualinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 94 of file socket.cpp.
|
inlineprotectedinherited |
|
inlineinherited |
|
virtualinherited |
Reimplemented in os::posix::file_lockable< T, L >.
|
inlineinherited |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 103 of file socket.cpp.
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 112 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 121 of file socket.cpp.
|
inline |
Definition at line 556 of file posix-io/socket.h.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 132 of file socket.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
inline |
Definition at line 550 of file posix-io/socket.h.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 141 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 150 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 160 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 169 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 178 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 187 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 197 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 208 of file socket.cpp.
|
virtual |
Reimplemented in os::posix::socket_lockable< T, L >.
Definition at line 217 of file socket.cpp.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.