This commit is contained in:
wangyu-
2017-09-24 03:14:08 -05:00
parent f096a510b5
commit fc05e7f080
8 changed files with 294 additions and 288 deletions

View File

@@ -8,6 +8,7 @@
int mtu_warn=1375;//if a packet larger than mtu warn is receviced,there will be a warning
int server_on_raw_recv_pre_ready(conn_info_t &conn_info,char * ip_port,u32_t tmp_oppsite_const_id);
int server_on_raw_recv_ready(conn_info_t &conn_info,char * ip_port,char type,char *data,int data_len);
int server_on_raw_recv_handshake1(conn_info_t &conn_info,char * ip_port,char * data, int data_len);
@@ -809,7 +810,7 @@ int server_on_raw_recv_ready(conn_info_t &conn_info,char * ip_port,char type,cha
return -1;
}
setnonblocking(new_udp_fd);
set_buf_size(new_udp_fd);
set_buf_size(new_udp_fd,socket_buf_size,force_socket_buf);
mylog(log_debug, "[%s]created new udp_fd %d\n",ip_port, new_udp_fd);
int ret = connect(new_udp_fd, (struct sockaddr *) &remote_addr_in,
@@ -1090,7 +1091,7 @@ int client_event_loop()
//g_packet_info.src_port=source_port;
udp_fd=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
set_buf_size(udp_fd);
set_buf_size(udp_fd,socket_buf_size,force_socket_buf);
int yes = 1;
//setsockopt(udp_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));