endpoint.h
//
// Copyright (C) 2009-2012 Artyom Beilis (Tonkikh)
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOSTER_AIO_ENDPOINT_H
#define BOOSTER_AIO_ENDPOINT_H
#include <booster/config.h>
#include <booster/copy_ptr.h>
#include <booster/aio/types.h>
#include <string>
extern "C" {
struct sockaddr;
};
namespace booster {
namespace aio {
class BOOSTER_API endpoint {
public:
endpoint();
endpoint(endpoint const &);
endpoint const &operator = (endpoint const &);
~endpoint();
endpoint(std::string const &ip,int port);
void ip(std::string const &);
void port(int);
std::string ip() const;
int port() const;
#ifndef BOOSTER_WIN32
endpoint(std::string const &);
void path(std::string const &);
std::string path() const;
#endif
family_type family() const;
void raw(sockaddr const *p,int size);
typedef std::pair<sockaddr const *,int> native_address_type;
native_address_type raw() const;
private:
void throw_invalid() const;
struct data;
copy_ptr<data> d;
};
} // aio
} // booster
#endif
booster::aio::endpoint
this class represents the connection endpoint, that is generally sockaddr structure in Berkeley socke...
Definition: endpoint.h:26
booster::copy_ptr< data >
booster::aio::endpoint::native_address_type
std::pair< sockaddr const *, int > native_address_type
Definition: endpoint.h:102
booster::aio::family_type
family_type
Definition: types.h:68