Open afwn90cj93201nixr2e1re opened 5 years ago
@danielga
I see, if the UDP packets go out of order or something else is received, the whole process is stopped.
So, how we can fix it? i think there no problems with order, coz every time we send last_address and if address is rly last, then we should get 0.0.0.0, sometimes it's happens, but, it's rarely.
I mean maybe we should use vector size instead prefering byteslength=recv?
https://stackoverflow.com/questions/53001843/c-recv-occasionally-returns-extremely-large-number
https://stackoverflow.com/questions/22106160/c-winsock-recv-returns-incorrect-and-strange-buffer
@danielga
Im using it in another thread. bytes_received = -1 | realsize = 1500 10060|A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
getting this error first thread https://pastebin.com/aUL4rJuJ
second thread https://pastebin.com/NKuG6K27
but timeout 10000ms.
Maybe we should make it more better? For example read buffer without parsing or smthng like that? while(recv... & ip != 0)send... send(end of connection) wait... read all server's to buffer.
stuck here
https://github.com/danielga/sourcequery/blob/development/source/sourcequery/masterquery.cpp#L290
but here https://github.com/danielga/sourcequery/blob/development/source/sourcequery/masterquery.cpp#L289 recv fill up recv_buffer.
then https://github.com/danielga/sourcequery/blob/development/source/sourcequery/masterquery.cpp#L304 never called.
https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol#Reply_format