3 This file is part of libmspnet
4 Copyright © 2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the LGPL
8 #ifndef MSP_NET_SOCKADDR_H_
9 #define MSP_NET_SOCKADDR_H_
12 #include <sys/socket.h>
14 #include "constants.h"
22 virtual Family get_family() const =0;
23 virtual std::string str() const =0;
26 Fills the given struct sockaddr with information from this SockAddr.
28 @return Number of bytes used
30 virtual unsigned fill_sockaddr(sockaddr &) const =0;
32 virtual SockAddr *copy() const =0;
34 virtual ~SockAddr() { }
36 static SockAddr *create(sockaddr &);