代码拉取完成,页面将自动刷新
同步操作将从 hotmocha/sbalance 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef __H_SB_CONSTANT_H_
#define __H_SB_CONSTANT_H_
#define SB_MAX_WORKERS_NUM 50
#define SB_SYS_CMD_QUICKEXIT 1
#define SB_SYS_CMD_SLOWEXIT 2
#define SB_SYS_CMD_RELOAD_CONFIG 3 /* no use for worker process */
#define SB_SYS_CMD_SHOW_STATUS 4
#define SYS_CONFIG_PATHFILE_NAME 256
#define IP_STR_LEN 64
#define BALANCE_MODE_RR "rr"
#define BALANCE_MODE_RANDOM "random"
#define BALANCE_MODE_WEIGHT "weight"
#define BALANCE_MODE_IPHASH "iphash"
#define CONF_LISTEN_NUM_PERRULE 5
#define CONF_CLIENT_NUM_PERRULE 50
#define CONF_SERVER_NUM_PERRULE 50
#define CONF_RULE_NAME_MAX_LEN 50
#define CONF_RULE_MAX_NUMS 25
#define CONF_INT_ANY -255
#define CONF_STR_ANY "any"
#define CONNECT_TYPE_CLIENT 1
#define CONNECT_TYPE_SERVER 2
#define EVENT_TYPE_LISTEN 1
#define EVENT_TYPE_SOCKET 2
#define EVENT_TYPE_FILEFD 3
#define MAXIOBUFLEN (4096 << 1)
#define MAXIOBUFLEN_2 (4096 << 2 )
#define MAXCANUSEBUFLEN 12288 /* (MAXIOBUFLEN * 3 / 4) */
#define MAXSAFEBUFLEN 4096 /* (MAXIOBUFLEN * 1 / 4) */
#define EMPTY_EVENT_DELAY_TIME 500 /*ms*/
#define FINISH_REASON_SUCESS_TRANSFER 0
#define FINISH_REASON_CLIENTNOTALLOW 1
#define FINISH_REASON_PROCESSEVENTERR 2
#define FINISH_REASON_TIMEOUT 3
#define FINISH_REASON_RESOURCENOTENOUGH 4
#define FINISH_REASON_CLIENTREADERR 5
#define FINISH_REASON_CLIENTWRITEERR 6
#define FINISH_REASON_SERVERREADERR 7
#define FINISH_REASON_SERVERWRITEERR 8
#define FINISH_REASON_CONNECTSERVERERR 9
#define FINISH_REASON_SYSTEMCALLERR 10
#define FINISH_REASON_INTERNALERR 11
#define FINISH_REASON_CANNOTGETSERVER 11
#define SYS_MAX_LISTEN_NUM 50
#define SYS_RECOURCE_POOR_ACCEPT_DELAY 1000 /* ms */
#define SB_OK 0
#define SB_ERROR -1
#define SB_AGAIN -2
#define SB_DONE -3
#define SB_DECLINE -4
#define SB_BUFNOTENOUGH -5
#define SB_TIMEOUT -6
#define SB_CONNECTERR -7
#define SB_NOTFOUND -8
#define SB_MSG_QUEUE_MAX_MSG_LEN 512
#define SB_NO_WAIT 1
/* dns */
#define SB_DNS_MAX_HOSTNAME_LEN 256
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。