#include <CArchNetworkBSD.h>
Inherits IArchNetwork.
Inheritance diagram for CArchNetworkBSD:
Public Member Functions | |
virtual CArchSocket | newSocket (EAddressFamily, ESocketType) |
Create a new socket. | |
virtual CArchSocket | copySocket (CArchSocket s) |
Copy a socket object. | |
virtual void | closeSocket (CArchSocket s) |
Release a socket reference. | |
virtual void | closeSocketForRead (CArchSocket s) |
Close socket for further reads. | |
virtual void | closeSocketForWrite (CArchSocket s) |
Close socket for further writes. | |
virtual void | bindSocket (CArchSocket s, CArchNetAddress addr) |
Bind socket to address. | |
virtual void | listenOnSocket (CArchSocket s) |
Listen for connections on socket. | |
virtual CArchSocket | acceptSocket (CArchSocket s, CArchNetAddress *addr) |
Accept connection on socket. | |
virtual bool | connectSocket (CArchSocket s, CArchNetAddress name) |
Connect socket. | |
virtual int | pollSocket (CPollEntry[], int num, double timeout) |
Check socket state. | |
virtual void | unblockPollSocket (CArchThread thread) |
Unblock thread in pollSocket(). | |
virtual size_t | readSocket (CArchSocket s, void *buf, size_t len) |
Read data from socket. | |
virtual size_t | writeSocket (CArchSocket s, const void *buf, size_t len) |
Write data from socket. | |
virtual void | throwErrorOnSocket (CArchSocket) |
Check error on socket. | |
virtual bool | setNoDelayOnSocket (CArchSocket, bool noDelay) |
Turn Nagle algorithm on or off on socket. | |
virtual bool | setReuseAddrOnSocket (CArchSocket, bool reuse) |
Turn address reuse on or off on socket. | |
virtual std::string | getHostName () |
Return local host's name. | |
virtual CArchNetAddress | newAnyAddr (EAddressFamily) |
Create an "any" network address. | |
virtual CArchNetAddress | copyAddr (CArchNetAddress) |
Copy a network address. | |
virtual CArchNetAddress | nameToAddr (const std::string &) |
Convert a name to a network address. | |
virtual void | closeAddr (CArchNetAddress) |
Destroy a network address. | |
virtual std::string | addrToName (CArchNetAddress) |
Convert an address to a host name. | |
virtual std::string | addrToString (CArchNetAddress) |
Convert an address to a string. | |
virtual EAddressFamily | getAddrFamily (CArchNetAddress) |
Get an address's family. | |
virtual void | setAddrPort (CArchNetAddress, int port) |
Set the port of an address. | |
virtual int | getAddrPort (CArchNetAddress) |
Get the port of an address. | |
virtual bool | isAnyAddr (CArchNetAddress) |
Test for the "any" address. | |
virtual bool | isEqualAddr (CArchNetAddress, CArchNetAddress) |
Test addresses for equality. |
Definition at line 54 of file CArchNetworkBSD.h.
|
Accept connection on socket.
Accepts a connection on socket Implements IArchNetwork. Definition at line 200 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd, CArchNetAddressImpl::m_len, CArchSocketImpl::m_refCount, and newSocket(). |
|
Bind socket to address.
Binds socket Implements IArchNetwork. Definition at line 178 of file CArchNetworkBSD.cpp. References CArchNetAddressImpl::m_addr, CArchSocketImpl::m_fd, and CArchNetAddressImpl::m_len. |
|
Release a socket reference. Deletes the given socket object. This does not destroy the socket the object referred to until there are no remaining references for the socket. Implements IArchNetwork. Definition at line 130 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd, and CArchSocketImpl::m_refCount. |
|
Close socket for further reads.
Calling this disallows future reads on socket Implements IArchNetwork. Definition at line 154 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Close socket for further writes.
Calling this disallows future writes on socket Implements IArchNetwork. Definition at line 166 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Connect socket.
Connects the socket Implements IArchNetwork. Definition at line 253 of file CArchNetworkBSD.cpp. References CArchNetAddressImpl::m_addr, CArchSocketImpl::m_fd, and CArchNetAddressImpl::m_len. |
|
Copy a socket object.
Returns a reference to to socket referred to by Implements IArchNetwork. Definition at line 118 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_refCount. |
|
Test for the "any" address.
Returns true if Implements IArchNetwork. Definition at line 819 of file CArchNetworkBSD.cpp. References getAddrFamily(), CArchNetAddressImpl::m_addr, and CArchNetAddressImpl::m_len. |
|
Listen for connections on socket.
Causes the socket Implements IArchNetwork. Definition at line 189 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Create a new socket. The socket is an opaque data type. Implements IArchNetwork. Definition at line 95 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd, CArchSocketImpl::m_refCount, and newSocket(). Referenced by acceptSocket(), and newSocket(). |
|
Check socket state.
Tests the state of (Cancellation point) Implements IArchNetwork. Definition at line 365 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd, and CArchSocketImpl::m_socket. |
|
Read data from socket.
Read up to Implements IArchNetwork. Definition at line 501 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Turn Nagle algorithm on or off on socket. Set socket to send messages immediately (true) or to collect small messages into one packet (false). Returns the previous state. Implements IArchNetwork. Definition at line 570 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Turn address reuse on or off on socket. Allows the address this socket is bound to to be reused while in the TIME_WAIT state. Returns the previous state. Implements IArchNetwork. Definition at line 593 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Check error on socket.
If the socket Implements IArchNetwork. Definition at line 531 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |
|
Unblock thread in pollSocket(). Cause a thread that's in a pollSocket() call to return. This call may return before the thread is unblocked. If the thread is not in a pollSocket() call this call has no effect. Implements IArchNetwork. Definition at line 489 of file CArchNetworkBSD.cpp. |
|
Write data from socket.
Write up to Implements IArchNetwork. Definition at line 516 of file CArchNetworkBSD.cpp. References CArchSocketImpl::m_fd. |