Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ssobjects::SockAddr Class Reference

Replacement for sockaddr_in structure. More...

#include <socketinstance.h>

Inheritance diagram for ssobjects::SockAddr::

sockaddr_in List of all members.

Public Methods

 SockAddr ()
 SockAddr (const sockaddr &sa)
 SockAddr (const sockaddr_in &sin)
 SockAddr (const ULONG ulAddr, const USHORT ushPort=0)
 SockAddr (const char *pchIP, const USHORT ushPort=0)
char * dottedDecimal ()
USHORT port () const
ULONG ipAddr () const
const SockAddr & operator= (const SOCKADDR &sa)
const SockAddr & operator= (const SOCKADDR_IN &sin)
 operator SOCKADDR ()
 operator LPSOCKADDR ()
 operator LPSOCKADDR_IN ()
bool operator== (const sockaddr_in &sa)
 Compairs two socket addresses. More...

Detailed Description

Replacement for sockaddr_in structure.

Provides a much easier way to access and manipulate a socket address structure.

Constructor & Destructor Documentation

ssobjects::SockAddr::SockAddr   [inline]

ssobjects::SockAddr::SockAddr const sockaddr &    sa [inline]

ssobjects::SockAddr::SockAddr const sockaddr_in   sin [inline]

ssobjects::SockAddr::SockAddr const ULONG    ulAddr,
const USHORT    ushPort = 0

ssobjects::SockAddr::SockAddr const char *    pchIP,
const USHORT    ushPort = 0

Member Function Documentation

char* ssobjects::SockAddr::dottedDecimal   [inline]

ULONG ssobjects::SockAddr::ipAddr   const [inline]

ssobjects::SockAddr::operator LPSOCKADDR   [inline]

ssobjects::SockAddr::operator LPSOCKADDR_IN   [inline]

ssobjects::SockAddr::operator SOCKADDR   [inline]

const SockAddr& ssobjects::SockAddr::operator= const SOCKADDR_IN   sin [inline]

const SockAddr& ssobjects::SockAddr::operator= const SOCKADDR   sa [inline]

bool SockAddr::operator== const sockaddr_in   sa

Compairs two socket addresses.

Does a compairison of the sin_family, sin_port and sin_addr to determine if the passed socket address is the same. sin_len & sin_zero are not checked as sin_len is not always implimented (Linux and Windows) and sin_zero is unused and only provided to make socket address structures at least 16-bytes in size.

true if they are found to be the same, false otherwise.
sin_zero may have other uses. It may have been used to obtain a byte by byte address, but this hasn't been verified.

USHORT ssobjects::SockAddr::port   const [inline]

The documentation for this class was generated from the following files:
Generated on Thu Nov 8 12:39:29 2001 for SimpleServerObjects by doxygen1.2.11 written by Dimitri van Heesch, © 1997-2001