View Single Post
karaulov
Senior Member
Join Date: Jul 2018
Old 11-29-2020 , 05:05   Re: Module: Threaded Sockets
Reply With Quote #78

Impossible to add backward compatibility with previous module versions?



And possible error in code, because send function send two requests instead of one?

RECV RETURN NEXT LINES:

Code:
L 11/28/2020 - 23:48:28: [myarenaapi.amxx] RECV:HTTP/1.1 200 OK
Server: nginx
Date: Sat, 28 Nov 2020 20:48:26 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=20
Access-Control-Allow-Origin: *
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload

2ac
{"status":"OK","data":{"b":{"type":"halflife","ip":"0.0.0.0","c_port":27015,"q_port":27015,"s_port":27015,"status":1},"s":{"game":"cstrike","name":"Server name","map":"de_dust2","players":1,"playersmax":32,"password":0},"p":[{"pid":0,"name":""Player name","score":0,"time":"00:18:31"}],"t":[]},"online":1,"server_id":"525","server_name":"Counter-Strike 1.6","server_address":"0.0.0.027015","server_maxslots":0,"server_location":"Moscow","server_type":"1 x Core i7 8700K OC, 2.5Gb RAM, 40Gb NVME","server_dateblock":"1609408607","server_daystoblock":33}
0

HTTP/1.1 400 Bad Request
Server: nginx/1.12.2
Date: Sat, 28 Nov 2020 20:48:26 GMT
Content-Type: text/html
Content-Length: 173
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>
Got two responses in one recv function!
And how to make RECV read all data (pass 0 or -1 to 'length' arg)?

Last edited by karaulov; 11-29-2020 at 05:09.
karaulov is offline