2 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
3 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
5 #include "cmogstored.h"
8 mog_accept_init(int fd
, struct mog_svc
*svc
,
9 struct mog_addrinfo
*a
, mog_post_accept_fn fn
)
11 struct mog_fd
*mfd
= mog_fd_init(fd
, MOG_FD_TYPE_ACCEPT
);
12 struct mog_accept
*ac
= &mfd
->as
.accept
;
14 ac
->post_accept_fn
= fn
;
17 memset(&ac
->thrpool
, 0, sizeof(struct mog_thrpool
));