OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The TSocketAddress class stores a Winsock socket address. More...
#include <owl/wskaddr.h>
Public Member Functions | |
TSocketAddress () | |
Only the family is specified. The rest of the data is currently undefined. | |
TSocketAddress (const sockaddr &src) | |
The argument is a socket address in network byte ordering. | |
TSocketAddress (const TSocketAddress &src) | |
The argument address should be in network byte ordering. | |
TSocketAddress (ushort family, char *data, short dataLength) | |
The argument address should be in network byte ordering. | |
TSocketAddress & | operator= (const sockaddr &src) |
The argument address should be in network byte ordering. | |
ushort | GetFamily () const |
Returns the family of addressing this address belongs to. | |
void | SetFamily (ushort family) |
Sets the family of addressing this address belongs to. | |
void | SetAddress (ushort family, const char *data, short dataLength) |
'newFamily' is AF_INET, etc. | |
Friends | |
bool | operator== (const TSocketAddress &address1, const TSocketAddress &address2) |
Both addresses should be in the same byte ordering as each other. | |
The TSocketAddress class stores a Winsock socket address.
This class is much like the sockaddr class; in fact, it is a subclass of sockaddr. Note that the TSocketAddress class does not store Internet (IP) addresses specifically. It stores generic socket addresses. The TINetSocketAddress class is used to store Internet addresses.
TSocketAddress normally stores its data in network byte ordering, as opposed to host byte ordering.
owl::TSocketAddress::TSocketAddress | ( | ) |
Only the family is specified. The rest of the data is currently undefined.
Definition at line 20 of file wskaddr.cpp.
owl::TSocketAddress::TSocketAddress | ( | const sockaddr & | src | ) |
The argument is a socket address in network byte ordering.
Definition at line 28 of file wskaddr.cpp.
References operator=().
owl::TSocketAddress::TSocketAddress | ( | const TSocketAddress & | src | ) |
The argument address should be in network byte ordering.
Definition at line 36 of file wskaddr.cpp.
References operator=().
The argument address should be in network byte ordering.
Definition at line 44 of file wskaddr.cpp.
References SetAddress().
|
inline |
TSocketAddress & owl::TSocketAddress::operator= | ( | const sockaddr & | src | ) |
The argument address should be in network byte ordering.
Definition at line 52 of file wskaddr.cpp.
References SetAddress().
'newFamily' is AF_INET, etc.
'data' is a pointer to data in the same format as sockaddr.sa_data[]. 'dataLength' is the length of data. It is limited to 14 bytes in WinSock 1.1. The passed data should be in network byte ordering.
Definition at line 80 of file wskaddr.cpp.
|
friend |
Both addresses should be in the same byte ordering as each other.
We just happen to know for a fact that the sockaddr's have same data as TSocketAddress's.
Definition at line 63 of file wskaddr.cpp.