GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GU_NET_SOCKADDR (3)

NAME

gu::net::Sockaddr - Class encapsulating struct sockaddr.

CONTENTS

Synopsis

SYNOPSIS

#include <gu_resolver.hpp>

    Public Member Functions

    Sockaddr (const sockaddr *sa, socklen_t sa_len)    
Sockaddr (const Sockaddr &sa)    
~Sockaddr ()    
sa_family_t get_family () const    
unsigned short get_port () const    
const void * get_addr () const    
socklen_t get_addr_len () const    
sockaddr & get_sockaddr ()    
const sockaddr & get_sockaddr () const    
socklen_t get_sockaddr_len () const    
bool is_multicast () const    
bool is_broadcast () const    
bool is_anyaddr () const    
Sockaddr & operator= (const Sockaddr &sa)

    Static Public Member Functions

    static Sockaddr get_anyaddr (const Sockaddr &sa)

Detailed Description

Class encapsulating struct sockaddr.

Class encapsulating struct sockaddr and providing simple interface to access sockaddr fields.

Constructor & Destructor Documentation

    gu::net::Sockaddr::Sockaddr (const sockaddr * sa, socklen_t sa_len)

Default constuctor.

Parameters:

sa Pointer to sockaddr struct
sa_len Length of sockaddr struct

gu::net::Sockaddr::Sockaddr (const Sockaddr & sa)

Copy constructor.

Parameters:

sa Reference to Sockaddr

    gu::net::Sockaddr::~Sockaddr ()

Destructor

Member Function Documentation

const void* gu::net::Sockaddr::get_addr () const [inline]

Get pointer to address. Return value is pointer to void, user must do casting by himself.

Todo

: Figure out how this could be done in type safe way.

Returns:

Void pointer to address element.

sa_family_t gu::net::Sockaddr::get_family () const [inline]

Get address family.

Returns:

Address family

unsigned short gu::net::Sockaddr::get_port () const [inline]

Get port in network byte order. This is applicable only for AF_INET, AF_INET6.

Returns:

Port in nework byte order

sockaddr& gu::net::Sockaddr::get_sockaddr () [inline]

Get non-const reference to sockaddr struct.

Returns:

Non-const reference to sockaddr struct.

const sockaddr& gu::net::Sockaddr::get_sockaddr () const [inline]

Get const reference to sockaddr struct.

Returns:

Const reference to sockaddr struct.

socklen_t gu::net::Sockaddr::get_sockaddr_len () const [inline]

Get length of sockaddr struct.

Returns:

Length of sockaddr struct

Author

Generated automatically by Doxygen for GCS from the source code.

Search for    or go to Top of page |  Section 3 |  Main Index


Version 0.2.3 GU::NET::SOCKADDR (3) Sun Apr 3 2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.