1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| | /*
* Copyright (C) 2012-2016 all contributors <cmogstored-public@bogomips.org>
* License: GPLv3 or later (see COPYING for details)
*/
#include "cmogstored.h"
struct mog_fd *
mog_accept_init(int fd, struct mog_svc *svc,
struct mog_addrinfo *a, mog_post_accept_fn fn)
{
struct mog_fd *mfd = mog_fd_init(fd, MOG_FD_TYPE_ACCEPT);
struct mog_accept *ac = &mfd->as.accept;
ac->post_accept_fn = fn;
ac->svc = svc;
ac->addrinfo = a;
memset(&ac->thrpool, 0, sizeof(struct mog_thrpool));
return mfd;
}
|