blob: 2923ec6692cedec91f51464dbc16d8bf51b08ca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// file : cult/os/net/address.hxx
// author : Boris Kolpackov <boris@kolpackov.Net>
// copyright : Copyright (c) 2005-2010 Boris Kolpackov
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#ifndef CULT_OS_NET_ADDRESS_HXX
#define CULT_OS_NET_ADDRESS_HXX
#include <cult/types.hxx>
#include <cult/os/exception.hxx>
#include <sys/socket.h> // sa_family_t, sockaddr
namespace Cult
{
namespace OS
{
namespace Net
{
class Address
{
public:
struct Exception: virtual OS::Exception {};
struct Invalid : virtual Exception {};
public:
Address ();
virtual
~Address ();
public:
//@@ need to wrap family
//
virtual sa_family_t
familiy () const = 0;
virtual sockaddr const*
raw_addr () const = 0;
virtual Size
raw_size () const = 0;
//@@ Should it be Clonable rather?
//
protected:
Address (Address const&);
Address&
operator= (Address const&);
};
}
}
}
#endif // CULT_OS_NET_ADDRESS_HXX
|