-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC support #8
base: master
Are you sure you want to change the base?
MSVC support #8
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,12 @@ | |
#include <stdlib.h> | ||
#include <string.h> | ||
#include <time.h> | ||
#ifdef _MSC_VER | ||
#include <processthreadsapi.h> | ||
#define localtime_r(timer, buf) localtime_s(buf, timer) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the return type is also different, I think defining a proper helper function like in libjuice would be better:
|
||
#else | ||
#include <unistd.h> | ||
#endif | ||
|
||
static FILE *log_file = NULL; | ||
|
||
|
@@ -85,7 +90,11 @@ int main(int argc, char *argv[]) { | |
goto error; | ||
} | ||
|
||
#ifdef _MSC_VER | ||
SuspendThread(/*TODO*/); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still WIP, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. My main question at the moment is whether running a STUN & TURN server on a node will even make a difference, i.e., if this use-case could be facilitated: https://stackoverflow.com/q/68600741 (my thinking is not which is why I've quasi-abandoned my contribution to the various open-source C STUN/TURN implementations) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. STUN est basically the standard way to implement NAT hole-punching (in particular in the context of ICE). The STUN server must be outside of the NAT you are trying to traverse (hole-punching always relies on a reachable third node outside the NAT), therefore, deploying a STUN server on one of the two connecting nodes won't make any difference. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's the same conclusion I came to (eventually). 😢 |
||
#else | ||
pause(); | ||
#endif | ||
|
||
juice_server_destroy(server); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
-Wall
work for MSVC? Is it translated by the CMake generator?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it didn't error at least