#include <socket.h>
Public Types | |
using | lockable_type = L |
using | value_type = T |
Types & Constants | |
enum class | 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_lockable (class net_stack &ns, lockable_type &locker) | |
virtual | ~socket_lockable () |
Public Member Functions | |
virtual int | close (void) override |
virtual class socket * | accept (sockaddr *address, socklen_t *address_len) override |
virtual int | bind (const sockaddr *address, socklen_t address_len) override |
virtual int | connect (const sockaddr *address, socklen_t address_len) override |
virtual int | getpeername (sockaddr *address, socklen_t *address_len) override |
virtual int | getsockname (sockaddr *address, socklen_t *address_len) override |
virtual int | getsockopt (int level, int option_name, void *option_value, socklen_t *option_len) override |
virtual int | listen (int backlog) override |
virtual ssize_t | recv (void *buffer, size_t length, int flags) override |
virtual ssize_t | recvfrom (void *buffer, size_t length, int flags, sockaddr *address, socklen_t *address_len) override |
virtual ssize_t | recvmsg (msghdr *message, int flags) override |
virtual ssize_t | send (const void *buffer, size_t length, int flags) override |
virtual ssize_t | sendmsg (const msghdr *message, int flags) override |
virtual ssize_t | sendto (const void *message, size_t length, int flags, const sockaddr *dest_addr, socklen_t dest_len) override |
virtual int | setsockopt (int level, int option_name, const void *option_value, socklen_t option_len) override |
virtual int | shutdown (int how) override |
virtual int | sockatmark (void) override |
value_type & | impl (void) const |
Public Member Functions | |
class net_stack * | net_stack (void) |
Public Member Functions | |
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 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) |
Definition at line 403 of file posix-io/socket.h.
using os::posix::socket_lockable< T, L >::lockable_type = L |
Definition at line 410 of file posix-io/socket.h.
|
inherited |
using os::posix::socket_lockable< T, L >::value_type = T |
Definition at line 409 of file posix-io/socket.h.
|
stronginherited |
os::posix::socket_lockable< T, L >::socket_lockable | ( | class net_stack & | ns, |
lockable_type & | locker | ||
) |
Definition at line 590 of file posix-io/socket.h.
|
virtual |
Definition at line 602 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 623 of file posix-io/socket.h.
|
protectedinherited |
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 634 of file posix-io/socket.h.
|
inlineprotectedinherited |
|
overridevirtual |
Reimplemented from os::posix::io.
Definition at line 613 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 645 of file posix-io/socket.h.
|
inlineprotectedinherited |
|
inlineinherited |
|
virtualinherited |
Reimplemented in os::posix::file_lockable< T, L >.
|
inlineinherited |
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 656 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 667 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 678 of file posix-io/socket.h.
socket_lockable< T, L >::value_type & os::posix::socket_lockable< T, L >::impl | ( | void | ) | const |
Definition at line 797 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 690 of file posix-io/socket.h.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
inlineinherited |
Definition at line 549 of file posix-io/socket.h.
|
virtualinherited |
Reimplemented in os::posix::block_device_lockable< T, L >, and os::posix::file_lockable< T, L >.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 700 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 710 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 722 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 732 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 742 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 752 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 765 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 777 of file posix-io/socket.h.
|
overridevirtual |
Reimplemented from os::posix::socket.
Definition at line 787 of file posix-io/socket.h.
|
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 >.