mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-09 20:55:38 +00:00
Win32 app / optional port (#609)
* Ignore libs_for_simulator content * Accept command line optional port * Fixed order of buttons * Adjusted argv parsing * Changed output assembly to openBeken_win32 * Automatically load the last project
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
|
||||
SOCKET ListenSocket = INVALID_SOCKET;
|
||||
|
||||
#define DEFAULT_PORT "80"
|
||||
int g_port = 80;
|
||||
|
||||
int HTTPServer_Start() {
|
||||
|
||||
@ -29,7 +29,10 @@ int HTTPServer_Start() {
|
||||
closesocket(ListenSocket);
|
||||
}
|
||||
// Resolve the server address and port
|
||||
iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result);
|
||||
char service[6];
|
||||
snprintf(service, sizeof(service), "%u", g_port);
|
||||
|
||||
iResult = getaddrinfo(NULL, service, &hints, &result);
|
||||
if ( iResult != 0 ) {
|
||||
printf("getaddrinfo failed with error: %d\n", iResult);
|
||||
WSACleanup();
|
||||
|
||||
Reference in New Issue
Block a user