Closed gloveboxes closed 2 years ago
@gloveboxes Thanks, since this PR contains changes on top of my PR (#53), I'll merge it and then yours, ok?
But I see that it doesn't build on (via Wine) :(
Looking at Travis CI logs, this happened because you added '#include <sys/socket.h>
' and '#include <sys/time.h>
' in ws.h, and Windows doesn't have the '<sys/socket.h>
' header. In fact, I believe you don't need these headers in ws.h, as ws.c already includes them for you, depending on the platform.
As a matter of interest, why don't you use WSL on Windows?
To be honest I've never used it, whenever I needed to compile something on Windows I used Cygwin or MinGW, so it was natural for me. I also believe that it is easier to use Cross-Compiler + Wine in TravisCI than to configure a Windows environment.
From a practical point of view, WSL appears to generate Linux binaries in Windows environments while MinGW generates native binaries for Windows and without any external dependencies.
So a project using wsServer + MinGW is able to run on various versions of Windows (Windows 7 included) without requiring anything other than the .dll's that Windows already provides.
@gloveboxes Sorry, I just saw that you sent the PR to 'pingpong_v2' instead of master.
But I've added your changes in master, and fixed the build problem too =). Thanks a lot for the changes, Ping/Pong should work as expected now.
@Theldus perfect - thank you for fixing and thanks again for the project. I have another suggestion/optimization, it is very modest, will open an issue. Thanks, Dave
@Theldus PR done, I updated the examples too. But I see that it doesn't build on (via Wine) :(
As a matter of interest, why don't you use WSL on Windows?
dg