Main Page

  • Main Page
  • Modules
  • Classes

Modules

Here is a list of all modules:
  • Socket Communication Classes
Copyright © 2003-2009 - Ernest Laurentin


Socket Communication Classes

Classes

struct | SockAddrIn
class | CSocketHandle

Typedefs

typedef
LPWSAOVERLAPPED_COMPLETION_ROUTINE 		LPWSACOMPLETIONROUTINE


  • Class List
  • Class Members

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
CSocketHandle
SockAddrIn


CSocketHandle Class Reference
[Socket Communication Classes]

#include <SocketHandle.h>

List of all members.

Public Member Functions

CSocketHandle ()
~CSocketHandle ()
bool | IsOpen () const
SOCKET | GetSocket () const
int | GetSocketType () const
bool | Attach (SOCKET sock)
SOCKET | Detach ()
bool | CreateSocket (LPCTSTR pszHost, LPCTSTR pszServiceName, int nFamily, int nType, UINT uOptions=0)
bool | ConnectTo (LPCTSTR pszHostName, LPCTSTR pszRemote, LPCTSTR pszServiceName, int nFamily, int nType)
void | Close ()
DWORD | Read (LPBYTE lpBuffer, DWORD dwSize, LPSOCKADDR lpAddrIn=NULL, DWORD dwTimeout=INFINITE)
DWORD | ReadEx (LPBYTE lpBuffer, DWORD dwSize, LPSOCKADDR lpAddrIn, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine)
DWORD | Write (const LPBYTE lpBuffer, DWORD dwCount, const LPSOCKADDR lpAddrIn=NULL, DWORD dwTimeout=INFINITE)
DWORD | WriteEx (const LPBYTE lpBuffer, DWORD dwCount, const LPSOCKADDR lpAddrIn, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine)
bool | IOControl (DWORD dwIoCode, LPBYTE lpInBuffer, DWORD cbInBuffer, LPBYTE lpOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine)
bool | GetTransferOverlappedResult (LPWSAOVERLAPPED lpOverlapped, LPDWORD lpcbTransfer, bool bWait=true, LPDWORD lpdwFlags=0)
bool | GetSockName (SockAddrIn &saddr_in) const
bool | GetPeerName (SockAddrIn &saddr_in) const
bool | AddMembership (LPCTSTR pszIPAddr, LPCTSTR pszNIC)
bool | DropMembership (LPCTSTR pszIPAddr, LPCTSTR pszNIC)

Static Public Member Functions

static bool | InitLibrary (WORD wVersion)
static bool | ReleaseLibrary ()
static SOCKET | WaitForConnection (SOCKET sock)
static bool | ShutdownConnection (SOCKET sock)
static bool | IsUnicastIP (ULONG ulAddr)
static bool | IsMulticastIP (ULONG ulAddr)
static bool | FormatIP (LPTSTR pszIPAddr, UINT nSize, ULONG ulAddr, bool bFmtHost)
static bool | FormatIP (LPTSTR pszIPAddr, UINT nSize, const SockAddrIn &addrIn)
static USHORT | GetPortNumber (LPCTSTR pszServiceName)
static ULONG | GetIPAddress (LPCTSTR pszHostName)
static bool | GetLocalName (LPTSTR pszName, UINT nSize)
static bool | GetLocalAddress (LPTSTR pszAddress, UINT nSize, int nFamily=AF_INET)
static bool | GetAddressInfo (LPCTSTR pszHostName, LPCTSTR pszServiceName, int nFamily, SockAddrIn &sockAddr)

Protected Attributes

SOCKET | m_hSocket
socket handle

Detailed Description

CSocketHandle class Socket communication class

Constructor & Destructor Documentation

CSocketHandle::CSocketHandle ( )

Default constructor

CSocketHandle::~CSocketHandle ( )

Destructor

Member Function Documentation

bool CSocketHandle::AddMembership | ( | LPCTSTR | pszIPAddr,
 |  | LPCTSTR | pszNIC
 | ) |  |

Register to multicast address

Parameters:
pszIPAddr | multicast IP group
pszNIC | interface IP address
Returns:
true if successful
See also:
InitLibrary

bool CSocketHandle::Attach ( SOCKET sock )

Attach a socket handle This function may fail is socket handle is not valid or object already in used. Call Detach or Close to release object.

Parameters:
sock Socket handle to attach to this class
Returns:
true if successful, otherwise false

void CSocketHandle::Close ( )

Close Socket

See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen

bool CSocketHandle::ConnectTo | ( | LPCTSTR | pszHostName,
 |  | LPCTSTR | pszRemote,
 |  | LPCTSTR | pszServiceName,
 |  | int | nFamily,
 |  | int | nType
 | ) |  |

Create a socket, connect to a server - Client side.

Parameters:
pszHostName | Hostname or NIC address
pszRemote | Remote network address
pszServiceName | Network service name or port number
nFamily | address family to use (AF_INET, AF_INET6)
nType | type of socket to create (SOCK_STREAM, SOCK_DGRAM)
Returns:
true if successful, otherwise false (call WSAGetLastError() to retrieve latest error)
See also:
InitLibrary, CreateSocket, IsOpen

bool CSocketHandle::CreateSocket | ( | LPCTSTR | pszHost,
 |  | LPCTSTR | pszServiceName,
 |  | int | nFamily,
 |  | int | nType,
 |  | UINT | uOptions = 0
 | ) |  |

Create a Socket - Server side.

Parameters:
pszHost | hostname or IP address of adapter
pszServiceName | Network service name or port number
nFamily | address family to use (AF_INET, AF_INET6)
nType | type of socket to create (SOCK_STREAM, SOCK_DGRAM)
uOptions | Additional options (SO_BROADCAST, SO_REUSEADDR)
Returns:
true if successful, otherwise false (call WSAGetLastError() to retrieve latest error)
See also:
InitLibrary, ConnectTo, IsOpen

SOCKET CSocketHandle::Detach ( )

Detach a socket handle

Returns:
previous socket handle or INVALID_SOCKET

bool CSocketHandle::DropMembership | ( | LPCTSTR | pszIPAddr,
 |  | LPCTSTR | pszNIC
 | ) |  |

Unregister from a multicast address

Parameters:
pszIPAddr | multicast IP group
pszNIC | interface IP address
Returns:
true if successful
See also:
InitLibrary

bool CSocketHandle::FormatIP | ( | LPTSTR | pszIPAddr,
 |  | UINT | nSize,
 |  | const SockAddrIn & | addrIn |
 | ) |  |  | [static]

Format IP address to string

Parameters:
pszIPAddr | Buffer to hold string
nSize | Size of buffer in characters
addrIn | IP Address to format
Returns:
true if successful. Possible error could be INSUFFICIENT_BUFFER

bool CSocketHandle::FormatIP | ( | LPTSTR | pszIPAddr,
 |  | UINT | nSize,
 |  | ULONG | ulAddr,
 |  | bool | bFmtHost |
 | ) |  |  | [static]

Format IP address to string

Parameters:
pszIPAddr | Buffer to hold string
nSize | Size of buffer in characters
ulAddr | IP Address to format
bFmtHost | Specify if address (ulAddr) is in host (true) or network format (false)
Returns:
true if successful. Possible error could be INSUFFICIENT_BUFFER

bool CSocketHandle::GetAddressInfo | ( | LPCTSTR | pszHostName,
 |  | LPCTSTR | pszServiceName,
 |  | int | nFamily,
 |  | SockAddrIn & | sockAddr |
 | ) |  |  | [static]

Get IP address info of a host (Supports: IPv4 and IPv6)

Parameters:
pszHostName | host name or IP address
pszServiceName | pszServiceName Network service name (e.g.: "ftp", "telnet") or port number
nFamily | address family to use (AF_INET, AF_INET6)
sockAddr | Socket address to fill in
Returns:
true if successful

ULONG CSocketHandle::GetIPAddress ( LPCTSTR pszHostName ) [static]

Get IP address of a host

Parameters:
pszHostName host name or IP address
Returns:
Host IP address in host format
See also:
GetAddressInfo

bool CSocketHandle::GetLocalAddress | ( | LPTSTR | pszAddress,
 |  | UINT | nSize,
 |  | int | nFamily = AF_INET |
 | ) |  |  | [static]

Get current (default) IP address for this machine

Parameters:
pszAddress | Buffer to receive IP address (IPv4, IPv6 format)
nSize | Size of this buffer in character
nFamily | address family to use (AF_INET, AF_INET6)
Returns:
true if successful

bool CSocketHandle::GetLocalName | ( | LPTSTR | pszName,
 |  | UINT | nSize |
 | ) |  |  | [static]

Get current localname for this machine

Parameters:
pszName | Buffer to receive host name
nSize | Size of this buffer in character
Returns:
true if successful

bool CSocketHandle::GetPeerName ( SockAddrIn & saddr_in ) const

Get Peer Socket name - get peer address

Parameters:
saddr_in peer address and port (use only with TCP or client mode UDP)
Returns:
true if successful
See also:
InitLibrary

USHORT CSocketHandle::GetPortNumber ( LPCTSTR pszServiceName ) [static]

Get service port number

Parameters:
pszServiceName Network service name (e.g.: "ftp", "telnet") or port number
Returns:
port number

SOCKET CSocketHandle::GetSocket ( ) const

Get SOCKET handle

Returns:
SOCKET handle (handle is INVALID_SOCKET if object is closed)

int CSocketHandle::GetSocketType ( ) const

Get SOCKET type

Returns:
SOCKET type (-1 if not a valid socket)

bool CSocketHandle::GetSockName ( SockAddrIn & saddr_in ) const

Get Socket name - get local address

Parameters:
saddr_in current local address and port when connected
Returns:
true if successful
See also:
InitLibrary

bool CSocketHandle::GetTransferOverlappedResult | ( | LPWSAOVERLAPPED | lpOverlapped,
 |  | LPDWORD | lpcbTransfer,
 |  | bool | bWait = true,
 |  | LPDWORD | lpdwFlags = 0
 | ) |  |

Get Overlapped result (asynchronous mode)

Parameters:
lpOverlapped | Windows Overlapped structure (required)
lpcbTransfer | Pointer to get number of bytes transferred
bWait | Force wait for overlapped operation to complete
lpdwFlags | Optional flags (see MSDN on WSARecv API)
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, ReadEx, WriteEx, IOControl

bool CSocketHandle::InitLibrary ( WORD wVersion ) [static]

Initialize Winsock library. This function calls WSAStartup.

Parameters:
wVersion Winsock version use MAKEWORD macro if possible (e.g.: MAKEWORD(2,2))
Returns:
true if successful
See also:
ReleaseLibrary

bool CSocketHandle::IOControl | ( | DWORD | dwIoCode,
 |  | LPBYTE | lpInBuffer,
 |  | DWORD | cbInBuffer,
 |  | LPBYTE | lpOutBuffer,
 |  | DWORD | cbOutBuffer,
 |  | LPDWORD | lpcbBytesReturned,
 |  | LPWSAOVERLAPPED | lpOverlapped,
 |  | LPWSACOMPLETIONROUTINE | lpCompletionRoutine
 | ) |  |

Control the mode of a socket (asynchronous mode)

Parameters:
dwIoCode | Control code of operation to perform
lpInBuffer | Pointer to the input buffer
cbInBuffer | Size of the input buffer, in bytes
lpOutBuffer | Pointer to the output buffer
cbOutBuffer | Size of the output buffer, in bytes
lpcbBytesReturned | Pointer to actual number of bytes of output
lpOverlapped | Winsock Overlapped structure
lpCompletionRoutine | Winsock Completion routine
Returns:
true if successful, otherwise false (call WSAGetLastError() to retrieve latest error)
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, ReadEx, WriteEx, GetTransferOverlappedResult

bool CSocketHandle::IsMulticastIP ( ULONG ulAddr ) [static]

Check if IP address is multicast (network order).

Parameters:
ulAddr IP address (expected valid multicast address)
Returns:
true if successful

bool CSocketHandle::IsOpen ( ) const

Check if socket is opened

Returns:
true if this is opened (valid)

bool CSocketHandle::IsUnicastIP ( ULONG ulAddr ) [static]

Check if IP address is unicast (network order).

Parameters:
ulAddr IP address (expected valid unicast address)
Returns:
true if successful

DWORD CSocketHandle::Read | ( | LPBYTE | lpBuffer,
 |  | DWORD | dwSize,
 |  | LPSOCKADDR | lpAddrIn = NULL,
 |  | DWORD | dwTimeout = INFINITE
 | ) |  |

Read from socket

Parameters:
lpBuffer | Buffer to receive data
dwSize | Size of buffer in bytes
lpAddrIn | Peer address for UDP - this must be NULL for TCP
dwTimeout | Read timeout in milliseconds
Returns:
number of bytes read or (-1L) if fail
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, ReadEx, Write, WriteEx

DWORD CSocketHandle::ReadEx | ( | LPBYTE | lpBuffer,
 |  | DWORD | dwSize,
 |  | LPSOCKADDR | lpAddrIn,
 |  | LPWSAOVERLAPPED | lpOverlapped,
 |  | LPWSACOMPLETIONROUTINE | lpCompletionRoutine
 | ) |  |

Read from socket (asynchronous mode).

Parameters:
lpBuffer | Buffer to receive data
dwSize | Size of buffer in bytes
lpAddrIn | SockAddrIn for UDP - this must be NULL for TCP
lpOverlapped | Windows Overlapped structure (required)
lpCompletionRoutine | Winsock Completion routine (required)
Returns:
number of bytes read, overlapped operation is pending or (-1L) if fail
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, Read, Write, WriteEx, IOControl, GetTransferOverlappedResult

bool CSocketHandle::ReleaseLibrary ( ) [static]

Release Winsock library

Returns:
true if successful
See also:
InitLibrary

bool CSocketHandle::ShutdownConnection ( SOCKET sock ) [static]

Shutdown a connection

Parameters:
sock Socket to shutdown communication
Returns:
true if successful

SOCKET CSocketHandle::WaitForConnection ( SOCKET sock ) [static]

Wait for a new connection

Parameters:
sock A TCP socket handle. A new socket is return returned.
Returns:
A new socket when a new client connects
See also:
GetSocket, CreateSocket

DWORD CSocketHandle::Write | ( | const LPBYTE | lpBuffer,
 |  | DWORD | dwCount,
 |  | const LPSOCKADDR | lpAddrIn = NULL,
 |  | DWORD | dwTimeout = INFINITE
 | ) |  |

Write to a destination socket

Parameters:
lpBuffer | Buffer to send
dwCount | Number of bytes to send
lpAddrIn | Peer address for UDP - this must be NULL for TCP
dwTimeout | Write timeout in milliseconds
Returns:
number of bytes sent or (-1L) if fail
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, Read, ReadEx, WriteEx

DWORD CSocketHandle::WriteEx | ( | const LPBYTE | lpBuffer,
 |  | DWORD | dwCount,
 |  | const LPSOCKADDR | lpAddrIn,
 |  | LPWSAOVERLAPPED | lpOverlapped,
 |  | LPWSACOMPLETIONROUTINE | lpCompletionRoutine
 | ) |  |

Write to a destination socket (asynchronous mode).

Parameters:
lpBuffer | Buffer to send
dwCount | Number of bytes to send
lpAddrIn | SockAddrIn for UDP - this must be NULL for TCP
lpOverlapped | Windows Overlapped structure (required)
lpCompletionRoutine | Winsock Completion routine (required)
Returns:
number of bytes read, overlapped operation is pending or (-1L) if fail
See also:
InitLibrary, CreateSocket, ConnectTo, IsOpen, Read, ReadEx, Write, IOControl, GetTransferOverlappedResult

The documentation for this class was generated from the following files:
  • SocketHandle.h
  • SocketHandle.cpp


SockAddrIn Struct Reference
[Socket Communication Classes]

#include <SocketHandle.h>

List of all members.

Public Member Functions

SockAddrIn ()
SockAddrIn (const SockAddrIn &sin)
~SockAddrIn ()
SockAddrIn & | Copy (const SockAddrIn &sin)
void | Clear ()
bool | IsEqual (const SockAddrIn &sin) const
bool | IsNull () const
short | GetFamily () const
ULONG | GetIPAddr () const
short | GetPort () const
bool | CreateFrom (LPCTSTR pszAddr, LPCTSTR pszService, int nFamily=AF_INET)
bool | CreateFrom (ULONG lIPAddr, USHORT nPort, int nFamily=AF_INET, bool bFmtHost=true)
SockAddrIn & | operator= (const SockAddrIn &sin)
bool | operator== (const SockAddrIn &sin) const
bool | operator!= (const SockAddrIn &sin) const
operator LPSOCKADDR ()
operator const IN6_ADDR * () const
operator PIN6_ADDR ()
size_t | Size () const
void | SetAddr (const sockaddr_in *psin)
void | SetAddr (const sockaddr_in6 *psin)
void | SetAddr (const sockaddr_storage *pss)

Detailed Description

SockAddrIn structure Encapsulate SOCKADDR_STORAGE (IPv4: SOCKADDR_IN, IPv6: SOCKADDR_IN6) structures

Constructor & Destructor Documentation

SockAddrIn::SockAddrIn ( )

Default constructor

SockAddrIn::SockAddrIn ( const SockAddrIn & sin )

Copy constructor

Parameters:
sin reference object

SockAddrIn::~SockAddrIn ( )

Destructor

Member Function Documentation

void SockAddrIn::Clear ( )

Clear struct

SockAddrIn & SockAddrIn::Copy ( const SockAddrIn & sin )

Copy function

Parameters:
sin reference object
Returns:
reference of 'this' object

bool SockAddrIn::CreateFrom | ( | ULONG | lIPAddr,
 |  | USHORT | nPort,
 |  | int | nFamily = AF_INET,
 |  | bool | bFmtHost = true
 | ) |  |

Create from number. Initialize object from host or network format values (IPv4 only).

Parameters:
lIPAddr | IP Address
nPort | Port number
nFamily | Socket address family (default: AF_INET)
bFmtHost | flag to indicate that IP address and port are in host (true) or network format (false)
Returns:
true if object is now valid

bool SockAddrIn::CreateFrom | ( | LPCTSTR | pszAddr,
 |  | LPCTSTR | pszService,
 |  | int | nFamily = AF_INET
 | ) |  |

Create from string. Service is service name or port number.

Parameters:
pszAddr | Hostname or IP address
pszService | Service name or port
nFamily | Socket address family (default: AF_INET, AF_INET6)
Returns:
true if object is now valid

short SockAddrIn::GetFamily ( ) const [inline]

Get Socket address family

Returns:
Socket address family (IPv4: AF_INET, IPv6: AF_INET6)

ULONG SockAddrIn::GetIPAddr ( ) const [inline]

Get IP address (IPv4)

Returns:
IPv4 network address in network format

short SockAddrIn::GetPort ( ) const [inline]

Get Port

Returns:
Port number in network format

bool SockAddrIn::IsEqual ( const SockAddrIn & sin ) const

Compare NetworkAddr object

Parameters:
sin reference object
Returns:
true if equal, otherwise false

bool SockAddrIn::IsNull ( ) const [inline]

Check if NULL

Returns:
true if object is 'NULL' - not valid

SockAddrIn::operator const IN6_ADDR * ( ) const [inline]

PIN6_ADDR conversion. Return const PIN6_ADDR of this object.

SockAddrIn::operator LPSOCKADDR ( ) [inline]

SOCKADDR conversion. Return SOCKADDR of this object.

SockAddrIn::operator PIN6_ADDR ( ) [inline]

PIN6_ADDR conversion. Return PIN6_ADDR of this object.

bool SockAddrIn::operator!= ( const SockAddrIn & sin ) const [inline]

Not Equal operator

Parameters:
sin reference object to test
Returns:
true if object is different

SockAddrIn& SockAddrIn::operator= ( const SockAddrIn & sin ) [inline]

Object copy operator

Parameters:
sin reference object to copy from
Returns:
reference of 'this' object

bool SockAddrIn::operator== ( const SockAddrIn & sin ) const [inline]

Equality operator

Parameters:
sin reference object to test
Returns:
true if object is equal

void SockAddrIn::SetAddr ( const sockaddr_storage * pss ) [inline]

Initialize this object from SOCKADDR_STORAGE struct.

Parameters:
pss SOCKADDR_STORAGE object pointer

void SockAddrIn::SetAddr ( const sockaddr_in6 * psin ) [inline]

Initialize this object from SOCKADDR_IN6 struct.

Parameters:
psin SOCKADDR_IN6 object pointer

void SockAddrIn::SetAddr ( const sockaddr_in * psin ) [inline]

Initialize this object from SOCKADDR_IN struct.

Parameters:
psin SOCKADDR_IN object pointer

size_t SockAddrIn::Size ( ) const [inline]

Size of this struct (SOCKADDR_IN) or (SOCKADDR_STORAGE) depending on address family

Returns:
size of this structure (SOCKADDR_IN) or (SOCKADDR_STORAGE)

The documentation for this struct was generated from the following files:
  • SocketHandle.h
  • SocketHandle.cpp


  • All
  • Functions
  • Variables
  • a
  • c
  • d
  • f
  • g
  • i
  • m
  • o
  • r
  • s
  • w
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • AddMembership() : CSocketHandle
  • Attach() : CSocketHandle

- c -

  • Clear() : SockAddrIn
  • Close() : CSocketHandle
  • ConnectTo() : CSocketHandle
  • Copy() : SockAddrIn
  • CreateFrom() : SockAddrIn
  • CreateSocket() : CSocketHandle
  • CSocketHandle() : CSocketHandle

- d -

  • Detach() : CSocketHandle
  • DropMembership() : CSocketHandle

- f -

  • FormatIP() : CSocketHandle

- g -

  • GetAddressInfo() : CSocketHandle
  • GetFamily() : SockAddrIn
  • GetIPAddr() : SockAddrIn
  • GetIPAddress() : CSocketHandle
  • GetLocalAddress() : CSocketHandle
  • GetLocalName() : CSocketHandle
  • GetPeerName() : CSocketHandle
  • GetPort() : SockAddrIn
  • GetPortNumber() : CSocketHandle
  • GetSocket() : CSocketHandle
  • GetSocketType() : CSocketHandle
  • GetSockName() : CSocketHandle
  • GetTransferOverlappedResult() : CSocketHandle

- i -

  • InitLibrary() : CSocketHandle
  • IOControl() : CSocketHandle
  • IsEqual() : SockAddrIn
  • IsMulticastIP() : CSocketHandle
  • IsNull() : SockAddrIn
  • IsOpen() : CSocketHandle
  • IsUnicastIP() : CSocketHandle

- m -

  • m_hSocket : CSocketHandle

- o -

  • operator const IN6_ADDR *() : SockAddrIn
  • operator LPSOCKADDR() : SockAddrIn
  • operator PIN6_ADDR() : SockAddrIn
  • operator!=() : SockAddrIn
  • operator=() : SockAddrIn
  • operator==() : SockAddrIn

- r -

  • Read() : CSocketHandle
  • ReadEx() : CSocketHandle
  • ReleaseLibrary() : CSocketHandle

- s -

  • SetAddr() : SockAddrIn
  • ShutdownConnection() : CSocketHandle
  • Size() : SockAddrIn
  • SockAddrIn() : SockAddrIn

- w -

  • WaitForConnection() : CSocketHandle
  • Write() : CSocketHandle
  • WriteEx() : CSocketHandle

- ~ -

  • ~CSocketHandle() : CSocketHandle
  • ~SockAddrIn() : SockAddrIn


CSocketHandle Member List

This is the complete list of members for CSocketHandle, including all inherited members.

AddMembership(LPCTSTR pszIPAddr, LPCTSTR pszNIC) | CSocketHandle |
Attach(SOCKET sock) | CSocketHandle |
Close() | CSocketHandle |
ConnectTo(LPCTSTR pszHostName, LPCTSTR pszRemote, LPCTSTR pszServiceName, int nFamily, int nType) | CSocketHandle |
CreateSocket(LPCTSTR pszHost, LPCTSTR pszServiceName, int nFamily, int nType, UINT uOptions=0) | CSocketHandle |
CSocketHandle() | CSocketHandle |
Detach() | CSocketHandle |
DropMembership(LPCTSTR pszIPAddr, LPCTSTR pszNIC) | CSocketHandle |
FormatIP(LPTSTR pszIPAddr, UINT nSize, ULONG ulAddr, bool bFmtHost) | CSocketHandle | [static]
FormatIP(LPTSTR pszIPAddr, UINT nSize, const SockAddrIn &addrIn) | CSocketHandle | [static]
GetAddressInfo(LPCTSTR pszHostName, LPCTSTR pszServiceName, int nFamily, SockAddrIn &sockAddr) | CSocketHandle | [static]
GetIPAddress(LPCTSTR pszHostName) | CSocketHandle | [static]
GetLocalAddress(LPTSTR pszAddress, UINT nSize, int nFamily=AF_INET) | CSocketHandle | [static]
GetLocalName(LPTSTR pszName, UINT nSize) | CSocketHandle | [static]
GetPeerName(SockAddrIn &saddr_in) const | CSocketHandle |
GetPortNumber(LPCTSTR pszServiceName) | CSocketHandle | [static]
GetSocket() const | CSocketHandle |
GetSocketType() const | CSocketHandle |
GetSockName(SockAddrIn &saddr_in) const | CSocketHandle |
GetTransferOverlappedResult(LPWSAOVERLAPPED lpOverlapped, LPDWORD lpcbTransfer, bool bWait=true, LPDWORD lpdwFlags=0) | CSocketHandle |
InitLibrary(WORD wVersion) | CSocketHandle | [static]
IOControl(DWORD dwIoCode, LPBYTE lpInBuffer, DWORD cbInBuffer, LPBYTE lpOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine) | CSocketHandle |
IsMulticastIP(ULONG ulAddr) | CSocketHandle | [static]
IsOpen() const | CSocketHandle |
IsUnicastIP(ULONG ulAddr) | CSocketHandle | [static]
m_hSocket | CSocketHandle | [protected]
Read(LPBYTE lpBuffer, DWORD dwSize, LPSOCKADDR lpAddrIn=NULL, DWORD dwTimeout=INFINITE) | CSocketHandle |
ReadEx(LPBYTE lpBuffer, DWORD dwSize, LPSOCKADDR lpAddrIn, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine) | CSocketHandle |
ReleaseLibrary() | CSocketHandle | [static]
ShutdownConnection(SOCKET sock) | CSocketHandle | [static]
WaitForConnection(SOCKET sock) | CSocketHandle | [static]
Write(const LPBYTE lpBuffer, DWORD dwCount, const LPSOCKADDR lpAddrIn=NULL, DWORD dwTimeout=INFINITE) | CSocketHandle |
WriteEx(const LPBYTE lpBuffer, DWORD dwCount, const LPSOCKADDR lpAddrIn, LPWSAOVERLAPPED lpOverlapped, LPWSACOMPLETIONROUTINE lpCompletionRoutine) | CSocketHandle |
~CSocketHandle() | CSocketHandle |


Class Index

C | S

C
CSocketHandle
S
SockAddrIn

C | S


  • All
  • Functions
  • Variables
  • a
  • c
  • d
  • f
  • g
  • i
  • o
  • r
  • s
  • w
  • ~

- a -

  • AddMembership() : CSocketHandle
  • Attach() : CSocketHandle

- c -

  • Clear() : SockAddrIn
  • Close() : CSocketHandle
  • ConnectTo() : CSocketHandle
  • Copy() : SockAddrIn
  • CreateFrom() : SockAddrIn
  • CreateSocket() : CSocketHandle
  • CSocketHandle() : CSocketHandle

- d -

  • Detach() : CSocketHandle
  • DropMembership() : CSocketHandle

- f -

  • FormatIP() : CSocketHandle

- g -

  • GetAddressInfo() : CSocketHandle
  • GetFamily() : SockAddrIn
  • GetIPAddr() : SockAddrIn
  • GetIPAddress() : CSocketHandle
  • GetLocalAddress() : CSocketHandle
  • GetLocalName() : CSocketHandle
  • GetPeerName() : CSocketHandle
  • GetPort() : SockAddrIn
  • GetPortNumber() : CSocketHandle
  • GetSocket() : CSocketHandle
  • GetSocketType() : CSocketHandle
  • GetSockName() : CSocketHandle
  • GetTransferOverlappedResult() : CSocketHandle

- i -

  • InitLibrary() : CSocketHandle
  • IOControl() : CSocketHandle
  • IsEqual() : SockAddrIn
  • IsMulticastIP() : CSocketHandle
  • IsNull() : SockAddrIn
  • IsOpen() : CSocketHandle
  • IsUnicastIP() : CSocketHandle

- o -

  • operator const IN6_ADDR *() : SockAddrIn
  • operator LPSOCKADDR() : SockAddrIn
  • operator PIN6_ADDR() : SockAddrIn
  • operator!=() : SockAddrIn
  • operator=() : SockAddrIn
  • operator==() : SockAddrIn

- r -

  • Read() : CSocketHandle
  • ReadEx() : CSocketHandle
  • ReleaseLibrary() : CSocketHandle

- s -

  • SetAddr() : SockAddrIn
  • ShutdownConnection() : CSocketHandle
  • Size() : SockAddrIn
  • SockAddrIn() : SockAddrIn

- w -

  • WaitForConnection() : CSocketHandle
  • Write() : CSocketHandle
  • WriteEx() : CSocketHandle

- ~ -

  • ~CSocketHandle() : CSocketHandle
  • ~SockAddrIn() : SockAddrIn


  • All
  • Functions
  • Variables

  • m_hSocket : CSocketHandle


Main Page


SockAddrIn Member List

This is the complete list of members for SockAddrIn, including all inherited members.

Clear() | SockAddrIn |
Copy(const SockAddrIn &sin) | SockAddrIn |
CreateFrom(LPCTSTR pszAddr, LPCTSTR pszService, int nFamily=AF_INET) | SockAddrIn |
CreateFrom(ULONG lIPAddr, USHORT nPort, int nFamily=AF_INET, bool bFmtHost=true) | SockAddrIn |
GetFamily() const | SockAddrIn | [inline]
GetIPAddr() const | SockAddrIn | [inline]
GetPort() const | SockAddrIn | [inline]
IsEqual(const SockAddrIn &sin) const | SockAddrIn |
IsNull() const | SockAddrIn | [inline]
operator const IN6_ADDR *() const | SockAddrIn | [inline]
operator LPSOCKADDR() | SockAddrIn | [inline]
operator PIN6_ADDR() | SockAddrIn | [inline]
operator!=(const SockAddrIn &sin) const | SockAddrIn | [inline]
operator=(const SockAddrIn &sin) | SockAddrIn | [inline]
operator==(const SockAddrIn &sin) const | SockAddrIn | [inline]
SetAddr(const sockaddr_in *psin) | SockAddrIn | [inline]
SetAddr(const sockaddr_in6 *psin) | SockAddrIn | [inline]
SetAddr(const sockaddr_storage *pss) | SockAddrIn | [inline]
Size() const | SockAddrIn | [inline]
SockAddrIn() | SockAddrIn |
SockAddrIn(const SockAddrIn &sin) | SockAddrIn |
~SockAddrIn() | SockAddrIn |