accept.hpp

1
2
3
4
5
6
7
8
9
#pragma once


#include <felspar/io/posix.hpp>
#include <felspar/io/warden.hpp>
#include <felspar/test/source.hpp>


namespace felspar::io {

Produce file descriptors for incoming connections to the provided socket

13
14
15
16
17
18
19
20
21
22
23
24
25
26
    warden::stream<socket_descriptor> accept(
            warden &,
            socket_descriptor,
            felspar::source_location = felspar::source_location::current());
    inline warden::stream<socket_descriptor>
            accept(warden &w,
                   posix::fd const &sock,
                   felspar::source_location const &loc =
                           felspar::source_location::current()) {
        return accept(w, sock.native_handle(), loc);
    }


}