nidas
v1.2-1520
|
An interface for a socket address. More...
#include <SocketAddress.h>
Public Member Functions | |
virtual SocketAddress * | clone () const =0 |
Virtual constructor. More... | |
virtual | ~SocketAddress () |
virtual int | getFamily () const =0 |
Get the family of this SocketAddress, one of the values from /usr/include/sys/socket.h: AF_UNIX, AF_INET, AF_INET6, etc. More... | |
virtual int | getPort () const =0 |
return the port number of this address, or -1 if there is no associated port number, e.g. More... | |
virtual struct sockaddr * | getSockAddrPtr ()=0 |
Provide non-const pointer to struct sockaddr_in. More... | |
virtual struct sockaddr * | getConstSockAddrPtr () const =0 |
virtual socklen_t | getSockAddrLen () const =0 |
Return the length of the struct sockaddr_XX for this address family. More... | |
virtual std::string | toString () const =0 |
Java style toString. More... | |
virtual std::string | toAddressString () const =0 |
Java style toString, but no DNS lookup. More... | |
An interface for a socket address.
|
inlinevirtual |
|
pure virtual |
Virtual constructor.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::DatagramPacketBase::operator=(), nidas::util::SocketImpl::operator=(), nidas::core::DSMServerStat::run(), nidas::core::DSMConfig::setDerivedDataSocketAddr(), nidas::core::Socket::setRemoteSocketAddress(), nidas::util::DatagramPacketBase::setSocketAddress(), nidas::core::DatagramSocket::setSocketAddress(), nidas::core::DSMServer::setStatusSocketAddr(), and nidas::core::DSMConfig::setStatusSocketAddr().
|
pure virtual |
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::dynld::UDPSampleOutput::ConnectionMonitor::addConnection(), nidas::core::Socket::connect(), nidas::core::DatagramSocket::connect(), nidas::util::DatagramPacketBase::getConstSockAddrPtr(), nidas::core::Socket::getRemoteInet4Address(), nidas::dynld::UDPSampleOutput::ConnectionMonitor::removeConnection(), nidas::core::DSMServerStat::run(), nidas::util::McSocketListener::run(), and nidas::util::McSocketMulticaster< SocketTT >::run().
|
pure virtual |
Get the family of this SocketAddress, one of the values from /usr/include/sys/socket.h: AF_UNIX, AF_INET, AF_INET6, etc.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::dynld::UDPSampleOutput::ConnectionMonitor::addConnection(), nidas::core::Socket::connect(), nidas::core::DatagramSocket::connect(), nidas::core::Socket::getRemoteInet4Address(), nidas::util::UnixSocketAddress::operator<(), nidas::util::UnixSocketAddress::operator==(), nidas::dynld::UDPSampleOutput::ConnectionMonitor::removeConnection(), nidas::core::DSMServerStat::run(), nidas::util::McSocketListener::run(), and nidas::util::McSocketMulticaster< SocketTT >::run().
|
pure virtual |
return the port number of this address, or -1 if there is no associated port number, e.g.
AF_UNIX.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::SocketImpl::getLocalPort(), nidas::util::SocketImpl::getRemotePort(), nidas::core::DSMServerApp::run(), and nidas::core::DSMEngine::run().
|
pure virtual |
Return the length of the struct sockaddr_XX for this address family.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::DatagramPacketBase::getSockAddrLen().
|
pure virtual |
Provide non-const pointer to struct sockaddr_in.
This is needed for recvfrom methods. recvfrom updates the struct sockaddr, so we can't cache the other portions of the address.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::DatagramPacketBase::getSockAddrPtr().
|
pure virtual |
Java style toString, but no DNS lookup.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::SocketImpl::accept(), nidas::core::Socket::connect(), nidas::util::SocketImpl::getBroadcastEnable(), nidas::util::SocketImpl::getInQueueSize(), nidas::util::SocketImpl::getInterface(), nidas::util::SocketImpl::getKeepAlive(), nidas::util::SocketImpl::getKeepAliveIdleSecs(), nidas::util::SocketImpl::getMulticastLoop(), nidas::core::RemoteSerialListener::getName(), nidas::util::SocketImpl::getOutQueueSize(), nidas::util::SocketImpl::getReceiveBufferSize(), nidas::util::SocketImpl::getSendBufferSize(), nidas::util::SocketImpl::getTcpNoDelay(), nidas::util::SocketImpl::getTimeToLive(), nidas::core::MultipleUDPSockets::handleChangedSockets(), nidas::util::SocketImpl::isNonBlocking(), nidas::util::SocketImpl::listen(), nidas::core::RemoteSerialConnection::RemoteSerialConnection(), nidas::core::StatusListener::run(), nidas::core::DerivedDataReader::run(), nidas::core::DSMEngineStat::run(), nidas::dynld::UDPSampleOutput::ConnectionMonitor::run(), nidas::dynld::UDPSampleOutput::XMLSocketListener::run(), nidas::core::ServerSocket::ConnectionThread::run(), and nidas::util::McSocketListener::run().
|
pure virtual |
Java style toString.
Implemented in nidas::util::Inet4SocketAddress, and nidas::util::UnixSocketAddress.
Referenced by nidas::util::ServerSocket::close(), nidas::util::SocketImpl::getLocalAddr(), nidas::util::SocketImpl::getRemoteAddr(), PacketReader::logBadPacket(), PacketReader::loop(), main(), StatsProcess::run(), RemoteSerial::run(), WriterThread::run(), ServerThread::run(), nidas::util::McSocketListener::run(), and nidas::util::McSocketMulticaster< SocketTT >::run().