UDP and TCPIP smaller tweaks

Using AI_PASSIVE now so the UDP server listens to all
addresses (0.0.0.0) instead of just localhost.
Also implemented address print function properly
This commit is contained in:
2021-04-12 12:33:45 +02:00
parent b4594e6f43
commit 06d34efa74
5 changed files with 71 additions and 17 deletions

View File

@ -4,6 +4,13 @@
#include "../../timemanager/clockDefinitions.h"
#include <string>
#ifdef _WIN32
#include <winsock2.h>
#else
#include <netdb.h>
#include <arpa/inet.h>
#endif
namespace tcpip {
const char* const DEFAULT_SERVER_PORT = "7301";
@ -28,8 +35,8 @@ enum class ErrorSources {
void determineErrorStrings(Protocol protocol, ErrorSources errorSrc, std::string& protStr,
std::string& srcString);
void printAddress(struct sockaddr* addr);
}
#endif /* FSFW_OSAL_COMMON_TCPIPCOMMON_H_ */