acceptor.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_ACCEPTOR_H
#define BOOSTER_AIO_ACCEPTOR_H
#include <booster/aio/types.h>
#include <booster/callback.h>
#include <booster/hold_ptr.h>
#include <booster/noncopyable.h>
#include <booster/aio/endpoint.h>
#include <booster/aio/basic_socket.h>
namespace booster {
namespace aio {
class io_service;
class stream_socket;
class BOOSTER_API acceptor : public basic_socket {
public:
acceptor();
acceptor(io_service &srv);
~acceptor();
void open(family_type d);
void open(family_type d,system::error_code &e);
void accept(stream_socket &s);
void accept(stream_socket &s,system::error_code &e);
void bind(endpoint const &ep);
void bind(endpoint const &ep,system::error_code &e);
void listen(int backlog);
void listen(int backlog,system::error_code &e);
void async_accept(stream_socket &s,event_handler const &h);
private:
struct data;
hold_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::hold_ptr< data >
booster::aio::basic_socket
This class represents a basic Socket object.
Definition: basic_socket.h:26
booster::callback
Definition: callback.h:18
booster::system::error_code
The lightweight object that carries a error code information and its category.
Definition: system_error.h:83
booster::aio::family_type
family_type
Definition: types.h:68
booster::aio::acceptor
this class represents a socket that accepts incoming connections
Definition: acceptor.h:26
booster::aio::stream_socket
This object represents a stream socket: TCP/IP IPv4 or IPv6 or Unix domain stream socket...
Definition: stream_socket.h:31
booster::aio::io_service
this is the central event loop that dispatches all requests.
Definition: io_service.h:37