Fixed udp server issue using PacketSend to verify the server was working, currently the UDP server only sends to itself, still to do is a from/recv concept from data packets (possibly split TCP/UDP send/recv functions)

This commit is contained in:
Jak Barnes 2019-03-16 18:00:50 +00:00
commit 867e29b6a4

View file

@ -64,7 +64,7 @@ int main()
int screenWidth = 800;
int screenHeight = 450;
InitWindow(
screenWidth, screenHeight, "raylib [network] example - ping pong");
screenWidth, screenHeight, "raylib [network] example - udp client");
SetTargetFPS(60);
SetTraceLogLevel(LOG_DEBUG);
@ -82,12 +82,6 @@ int main()
if (!SocketCreate(&client_cfg, client_res)) {
TraceLog(LOG_WARNING, "Failed to open client: status %d, errno %d",
client_res->status, client_res->socket->status);
} else {
if (!SocketConnect(&client_cfg, client_res)) {
TraceLog(LOG_WARNING,
"Failed to connect to server: status %d, errno %d",
client_res->status, client_res->socket->status);
}
}
// Create & Add sockets to the socket set