feat: add secure host based config (sbhc) helpers to create response messages, use 16993 instead of 16992 if secure host configuration set.

This commit is contained in:
Mudit Vats
2021-02-24 14:42:48 -07:00
parent 13975eaf2d
commit 6eecea264e
6 changed files with 160 additions and 5 deletions

13
lms.cpp
View File

@@ -15,13 +15,22 @@
#include <netdb.h>
#endif
SOCKET lms_connect()
SOCKET lms_connect(bool securePort)
{
std::string lmsAddress = "localhost";
std::string lmsPort = "16992";
std::string lmsPort;
SOCKET s = INVALID_SOCKET;
struct addrinfo *addr, hints;
if (securePort)
{
lmsPort = "16993";
}
else
{
lmsPort = "16992";
}
#ifdef _WIN32
WSADATA wsa;
if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0)