We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const int invalid_protocol_return = 1; const int invalid_sockettype_return = 2; const int udp_protocol = 1; const int tcp_protocol = 2; const int client_socket = 1; const int server_socket = 2; u_short socket_port = 5000; std::string destination_ip = "192.168.2.182"; TCPClient client(socket_port, destination_ip); int connection_status = client.make_connection(); // Return if there is an issue binding if (connection_status) { return connection_status; } else { while (true) { client.send_message("Testmessage\n"); client.send_message("Testmessage2\n"); svcSleepThread(1000000000ull); // 5s } }
this code sends Testmessage but not Testmessage2, nor does it loop. it looks like it just stops executing.
Testmessage
Testmessage2
EDIT: figured out why.
if (recv(m_socket, server_reply, 2000, 0) == SOCKET_ERROR)
blocks code execution untill something is recieved, even tho i never wanted to recieve anything.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
this code sends
Testmessage
but notTestmessage2
, nor does it loop. it looks like it just stops executing.EDIT: figured out why.
if (recv(m_socket, server_reply, 2000, 0) == SOCKET_ERROR)
blocks code execution untill something is recieved, even tho i never wanted to recieve anything.
The text was updated successfully, but these errors were encountered: