cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob 916ded304e8793238d07536c58664d9e2f8ccf81 514 bytes (raw)
$ git show HEAD:accept.c	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
/*
 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 */
#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;
}

git clone https://yhbt.net/cmogstored.git