|
SNode.C
|
#include <PhysicalSocket.h>
Public Types | |
| enum | Flags { NONE = 0 , NONBLOCK = SOCK_NONBLOCK , CLOEXIT = SOCK_CLOEXEC } |
Public Member Functions | |
| PhysicalSocket ()=delete | |
| PhysicalSocket (PhysicalSocket &)=delete | |
| PhysicalSocket & | operator= (PhysicalSocket &)=delete |
| PhysicalSocket (const PhysicalSocket &)=delete | |
| PhysicalSocket & | operator= (const PhysicalSocket &)=delete |
| PhysicalSocket (int fd, const SocketAddress &bindAddress) | |
| int | open (const std::map< int, std::map< int, PhysicalSocketOption > > &socketOptionsMapMap, Flags flags) |
| int | bind (SocketAddress &bindAddress) |
| bool | isValid () const |
| int | getSockError (int &cErrno) const |
| int | getSockName (typename SocketAddress::SockAddr &localSockAddr, typename SocketAddress::SockLen &localSockAddrLen) |
| int | getPeerName (typename SocketAddress::SockAddr &remoteSockAddr, typename SocketAddress::SockLen &remoteSockAddrLen) |
| const SocketAddress & | getBindAddress () const |
Public Member Functions inherited from core::Descriptor | |
| Descriptor ()=delete | |
| Descriptor (const Descriptor &d)=delete | |
| Descriptor & | operator= (int fd) |
| Descriptor & | operator= (const Descriptor &descriptor)=delete |
| Descriptor & | operator= (Descriptor &&descriptor) noexcept |
| int | getFd () const |
Protected Types | |
| using | SocketAddress = SocketAddressT |
Protected Member Functions | |
| PhysicalSocket (int domain, int type, int protocol) | |
| PhysicalSocket (PhysicalSocket &&physicalSocket) noexcept=default | |
| PhysicalSocket & | operator= (PhysicalSocket &&) noexcept=default |
| ~PhysicalSocket () override | |
Protected Member Functions inherited from core::Descriptor | |
| Descriptor (int fd) | |
| Descriptor (Descriptor &&descriptor) noexcept | |
| virtual | ~Descriptor () |
Protected Attributes | |
| SocketAddress | bindAddress |
| int | domain = 0 |
| int | type = 0 |
| int | protocol = 0 |
Private Types | |
| using | Super = core::Descriptor |
Private Member Functions | |
| int | setSockopt (int level, int optname, const void *optval, typename SocketAddress::SockLen optlen) const |
| int | getSockopt (int level, int optname, void *optval, typename SocketAddress::SockLen *optlen) const |
Definition at line 60 of file PhysicalSocket.h.
|
protected |
Definition at line 68 of file PhysicalSocket.h.
|
private |
Definition at line 62 of file PhysicalSocket.h.
| enum net::phy::PhysicalSocket::Flags |
|
protected |
Definition at line 54 of file PhysicalSocket.hpp.
References net::phy::PhysicalSocket< SocketAddressT >::domain, net::phy::PhysicalSocket< SocketAddressT >::protocol, and net::phy::PhysicalSocket< SocketAddressT >::type.
|
protecteddefaultnoexcept |
|
overrideprotected |
Definition at line 76 of file PhysicalSocket.hpp.
|
delete |
|
delete |
|
delete |
| net::phy::PhysicalSocket< SocketAddress >::PhysicalSocket | ( | int | fd, |
| const SocketAddress & | bindAddress | ||
| ) |
Definition at line 62 of file PhysicalSocket.hpp.
References net::phy::PhysicalSocket< SocketAddressT >::bindAddress, net::phy::PhysicalSocket< SocketAddressT >::domain, net::phy::PhysicalSocket< SocketAddressT >::getSockopt(), net::phy::PhysicalSocket< SocketAddressT >::protocol, and net::phy::PhysicalSocket< SocketAddressT >::type.
| int net::phy::PhysicalSocket< SocketAddress >::bind | ( | SocketAddress & | bindAddress | ) |
Definition at line 106 of file PhysicalSocket.hpp.
References core::system::bind(), net::phy::PhysicalSocket< SocketAddressT >::bindAddress, and core::Descriptor::getFd().
| const SocketAddress & net::phy::PhysicalSocket< SocketAddress >::getBindAddress | ( | ) | const |
Definition at line 151 of file PhysicalSocket.hpp.
References net::phy::PhysicalSocket< SocketAddressT >::bindAddress.
| int net::phy::PhysicalSocket< SocketAddress >::getPeerName | ( | typename SocketAddress::SockAddr & | remoteSockAddr, |
| typename SocketAddress::SockLen & | remoteSockAddrLen | ||
| ) |
Definition at line 145 of file PhysicalSocket.hpp.
References core::Descriptor::getFd(), and core::system::getpeername().
| int net::phy::PhysicalSocket< SocketAddress >::getSockError | ( | int & | cErrno | ) | const |
Definition at line 122 of file PhysicalSocket.hpp.
References net::phy::PhysicalSocket< SocketAddressT >::getSockopt().
| int net::phy::PhysicalSocket< SocketAddress >::getSockName | ( | typename SocketAddress::SockAddr & | localSockAddr, |
| typename SocketAddress::SockLen & | localSockAddrLen | ||
| ) |
Definition at line 139 of file PhysicalSocket.hpp.
References core::Descriptor::getFd(), and core::system::getsockname().
|
private |
Definition at line 134 of file PhysicalSocket.hpp.
References core::Descriptor::getFd(), and core::system::getsockopt().
Referenced by net::phy::PhysicalSocket< SocketAddressT >::getSockError(), and net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket().
| bool net::phy::PhysicalSocket< SocketAddress >::isValid | ( | ) | const |
Definition at line 117 of file PhysicalSocket.hpp.
References core::Descriptor::getFd().
| int net::phy::PhysicalSocket< SocketAddress >::open | ( | const std::map< int, std::map< int, PhysicalSocketOption > > & | socketOptionsMapMap, |
| Flags | flags | ||
| ) |
Definition at line 80 of file PhysicalSocket.hpp.
References net::phy::PhysicalSocket< SocketAddressT >::domain, net::phy::PhysicalSocketOption::getOptLen(), net::phy::PhysicalSocketOption::getOptLevel(), net::phy::PhysicalSocketOption::getOptName(), net::phy::PhysicalSocketOption::getOptValue(), net::phy::PhysicalSocket< SocketAddressT >::protocol, net::phy::PhysicalSocket< SocketAddressT >::setSockopt(), core::system::socket(), and net::phy::PhysicalSocket< SocketAddressT >::type.
|
delete |
|
protecteddefaultnoexcept |
|
delete |
|
private |
Definition at line 129 of file PhysicalSocket.hpp.
References core::Descriptor::getFd(), and core::system::setsockopt().
Referenced by net::phy::PhysicalSocket< SocketAddressT >::open().
|
protected |
Definition at line 104 of file PhysicalSocket.h.
Referenced by net::phy::PhysicalSocket< SocketAddressT >::bind(), net::phy::PhysicalSocket< SocketAddressT >::getBindAddress(), and net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket().
|
protected |
Definition at line 106 of file PhysicalSocket.h.
Referenced by net::phy::PhysicalSocket< SocketAddressT >::open(), net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket(), and net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket().
|
protected |
Definition at line 108 of file PhysicalSocket.h.
Referenced by net::phy::PhysicalSocket< SocketAddressT >::open(), net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket(), and net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket().
|
protected |
Definition at line 107 of file PhysicalSocket.h.
Referenced by net::phy::PhysicalSocket< SocketAddressT >::open(), net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket(), and net::phy::PhysicalSocket< SocketAddressT >::PhysicalSocket().