equal
deleted
inserted
replaced
108 |
108 |
109 packet_len = sizeof(p.buffer); |
109 packet_len = sizeof(p.buffer); |
110 client_len = sizeof(client_addr); |
110 client_len = sizeof(client_addr); |
111 |
111 |
112 /* Try to receive anything */ |
112 /* Try to receive anything */ |
|
113 SetNonBlocking(this->sock); // Some OSes seem to loose the non-blocking status of the socket |
113 nbytes = recvfrom(this->sock, (char*)p.buffer, packet_len, 0, (struct sockaddr *)&client_addr, &client_len); |
114 nbytes = recvfrom(this->sock, (char*)p.buffer, packet_len, 0, (struct sockaddr *)&client_addr, &client_len); |
114 |
115 |
115 /* We got some bytes for the base header of the packet. */ |
116 /* We got some bytes for the base header of the packet. */ |
116 if (nbytes > 2) { |
117 if (nbytes > 2) { |
117 p.PrepareToRead(); |
118 p.PrepareToRead(); |