Add NetUnit save Gen

This commit is contained in:
2025-01-22 02:27:00 +01:00
parent 5342f1b928
commit e50acd9cc5
5 changed files with 54 additions and 27 deletions

View File

@@ -72,13 +72,7 @@ int sendFile()
serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(PORT);
// Convert IPv4 and IPv6 addresses from text to binary form
if (inet_pton(AF_INET, "127.0.0.1", &serv_addr.sin_addr) <= 0)
{
TraceLog(LOG_ERROR, "Invalid address/ Address not supported");
return 1;
}
serv_addr.sin_addr = ipAddr;
if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
{
@@ -119,13 +113,6 @@ int sendBuffer()
serv_addr.sin_port = htons(PORT);
serv_addr.sin_addr = ipAddr;
// Convert IPv4 and IPv6 addresses from text to binary form
// if (inet_pton(AF_INET, "192.168.0.31", &serv_addr.sin_addr) <= 0)
// {
// TraceLog(LOG_ERROR, "Invalid address/ Address not supported");
// return 1;
// }
if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
{
TraceLog(LOG_ERROR, "Connection Failed");