Lines Matching refs:len
76 int len = recv(conn, buffer, sizeof(buffer), 0); in tcp_server() local
77 if (len <= 0) in tcp_server()
79 printf("Receive data failed! len=%d\n", len); in tcp_server()
88 send(conn, buffer, len, 0); in tcp_server()
119 …int len = recvfrom(server_sockfd, buffer, sizeof(buffer), 0, (struct sockaddr *)&client_addr, &cli… in udp_server() local
120 if (len <= 0) in udp_server()
122 printf("Receive data failed! len=%d", len); in udp_server()
131 sendto(server_sockfd, buffer, len, 0, (struct sockaddr *)&client_addr, client_length); in udp_server()
195 int sockfd, len = 0; in udp_client() local
222 len = read(STDIN_FILENO, buffer, sizeof(buffer)); in udp_client()
223 printf("to send: %d\n", len); in udp_client()
225 sendto(sockfd, buffer, len, 0, (struct sockaddr *)&addr, addr_len); in udp_client()
228 len = recvfrom(sockfd, buffer, sizeof(buffer), 0, (struct sockaddr *)&addr, &addr_len); in udp_client()