1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/apfree-xkcptun

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
xkcp_config.h 2.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
ZengFei Zhang Отправлено 16.05.2017 12:44 60a688e
/********************************************************************\
* This program 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. *
* *
* This program 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, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
#ifndef _XKCP_CONFIG_
#define _XKCP_CONFIG_
struct xkcp_param {
char *local_interface; // localaddr
char *remote_addr; // remoteaddr
char *key; // key
char *crypt; // crypt
char *mode; // mode
int local_port; // local tcp listen port
int remote_port; // remote udp connect port
int conn; // conn
int auto_expire; // autoexpire
int scavenge_ttl; // scavengettl
int mtu; // mtu
int sndwnd; // sndwnd
int rcvwnd; // rcvwnd
int data_shard; // datashard
int parity_shard; // parityshard
int dscp; // dscp
int nocomp; // nocomp
int ack_nodelay; // acknodelay
int nodelay; // nodelay
int interval; // interval
int resend; // resend
int nc; // no congestion
int sock_buf; // sockbuf
int keepalive; // keepalive
};
struct xkcp_config {
char *config_file;
int daemon;
int is_server;
int (*main_loop)();
struct xkcp_param param;
};
void config_init(void);
struct xkcp_config *xkcp_get_config(void);
int xkcp_param_validate(struct xkcp_param * param);
int xkcp_parse_param(const char *filename);
int xkcp_parse_json_param(struct xkcp_param *config, const char *filename);
struct xkcp_param *xkcp_get_param(void);
#endif

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/apfree-xkcptun.git
git@api.gitlife.ru:oschina-mirror/apfree-xkcptun.git
oschina-mirror
apfree-xkcptun
apfree-xkcptun
master