void asynconnect(msgdisp_t disp,sock_ident sock,const char *ip,int32_t port) { printf("asynconnect,ip:%s,port:%d\n",ip,port); disp->bind(disp,0,sock,16000,1,0,0);//由系统选择poller }
void to_server_connect(msgdisp_t disp,sock_ident sock,const char *ip,int32_t port) { //用第二个poller处理到服务器的连接 disp->bind(disp,2,sock,1,3*1000,0);//由系统选择poller }
static void agent_connect(msgdisp_t disp,sock_ident sock,const char *ip,int32_t port) { disp->bind(g_agents[rand()%agentcount]->msgdisp,0,sock,4096,0,30*1000,0);//由系统选择poller }
void to_client_connect(msgdisp_t disp,sock_ident sock,const char *ip,int32_t port) { //用第3个poller处理到客户端的连接 disp->bind(disp,3,sock,1,3*1000,0);//由系统选择poller }
void super_connect(msgdisp_t disp,sock_ident sock,const char *ip,int32_t port) { disp->bind(disp,0,sock,65536,1,3*1000,0);//由系统选择poller }