make socket non-blocking

This commit is contained in:
MihailRis
2024-11-26 17:12:24 +03:00
parent e8b674ca65
commit 18bdce52df
3 changed files with 37 additions and 8 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ TEST(curltest, curltest) {
}, [](auto){}
);
if (false) {
auto socket = network->connect("localhost", 8000);
auto socket = network->getConnection(network->connect("localhost", 8000));
const char* string = "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n";
socket->send(string, strlen(string));
char data[1024];