/**
 * Copyright (C) 2007 iptego GmbH
 *
 * This file is part of ser, a free SIP server.
 *
 * ser is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version
 *
 * ser is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __BINRPC_PT_H__
#define __BINRPC_PT_H__

#include <unistd.h>
#include "ctrl_socks.h"

int pt_init(size_t count);
int pt_ins(pid_t pid, int fd);
ssize_t pt_least_loaded(size_t *load);
struct ctrl_socket *pt_update_load(ssize_t worker, int direction);
pid_t pt_pid(ssize_t worker);
ssize_t pt_worker(pid_t child);
int pt_fd2cs(void);
void pt_free(int has_cs);


#endif /* __BINRPC_PT_H__ */
