mace::SockAddr Class Reference

#include <MaceKey.h>

Inheritance diagram for mace::SockAddr:

Inheritance graph
[legend]
Collaboration diagram for mace::SockAddr:

Collaboration graph
[legend]

List of all members.


Detailed Description

Helper class to represent an IP and port pair.

Note, for NAT addresses, a sockaddr may have port=0 and addr=id, where the id is the NAT id to compare against for other sockets. A null SockAddr will have port=0 and addr=INADDR_NONE.

Definition at line 109 of file MaceKey.h.


Public Member Functions

void serialize (std::string &s) const
 Encode the current object at the end of str as a bytestring in a compact format (and which doesn't require delimiters to parse).
int deserialize (std::istream &in) throw (mace::SerializationException)
 Replace the current object value from the bytes read from in, returning the number of bytes read.
bool isUnroutable () const
 Implies a connection cannot be initiated to this address. True when non-null and port=0.
bool isNull () const
 Implies it does not refer to an actual socket addr. No port or ip.

Public Attributes

uint32_t addr
 The IP address as a packed int.
uint16_t port
 A TCP or UDP port port.

The documentation for this class was generated from the following files:

Generated on Sat Oct 4 21:30:38 2008 for Mace Library by  doxygen 1.5.5