summaryrefslogtreecommitdiff
path: root/libcult/cult/os/net/address.hxx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
committerJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
commita15cf65c44d5c224169c32ef5495b68c758134b7 (patch)
tree3419f58fc8e1b315ba8171910ee044c5d467c162 /libcult/cult/os/net/address.hxx
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'libcult/cult/os/net/address.hxx')
-rw-r--r--libcult/cult/os/net/address.hxx60
1 files changed, 60 insertions, 0 deletions
diff --git a/libcult/cult/os/net/address.hxx b/libcult/cult/os/net/address.hxx
new file mode 100644
index 0000000..2923ec6
--- /dev/null
+++ b/libcult/cult/os/net/address.hxx
@@ -0,0 +1,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