Skip to content

Conversation

@enzobet
Copy link
Contributor

@enzobet enzobet commented Oct 19, 2021

Copied the network_to_host_short function from the ASIO library to convert the remote port byte code to a uint16 number.

This resolves the issue noted in #320

Copied the network_to_host_short function from the ASIO library to convert the remote port byte code to a uint16 number.
Copy link
Contributor

@bsergean bsergean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix !

@bsergean
Copy link
Contributor

The build fails on windows, I think it's because uint16_t is unknown.

Can you try to add a header like #include ?

[8/74] Building CXX object CMakeFiles\ixwebsocket.dir\ixwebsocket\IXGetFreePort.cpp.obj
FAILED: CMakeFiles/ixwebsocket.dir/ixwebsocket/IXGetFreePort.cpp.obj 
C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -D_CRT_SECURE_NO_WARNINGS -I..\ /DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0 /Od /RTC1 -MDd /MP /showIncludes /FoCMakeFiles\ixwebsocket.dir\ixwebsocket\IXGetFreePort.cpp.obj /FdCMakeFiles\ixwebsocket.dir\ixwebsocket.pdb /FS -c ..\ixwebsocket\IXGetFreePort.cpp
D:\a\IXWebSocket\IXWebSocket\ixwebsocket/IXNetSystem.h(85): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\a\IXWebSocket\IXWebSocket\ixwebsocket/IXNetSystem.h(85): error C2146: syntax error: missing ';' before identifier 'network_to_host_short'
[9/74] Building CXX object CMakeFiles\ixwebsocket.dir\ixwebsocket\IXHttpClient.cpp.obj
[10/74] Building CXX object CMakeFiles\ixwebsocket.dir\ixwebsocket\IXHttpServer.cpp.obj

Copy link
Contributor

@bsergean bsergean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes to fix the build error, which should be a simple one

https://stackoverflow.com/questions/17436527/error-uint16-t-undeclared

@bsergean
Copy link
Contributor

mac_tsan_mbedtls / mac_tsan_mbedtls (pull_request) that test can be ignored.

@enzobet
Copy link
Contributor Author

enzobet commented Oct 22, 2021

Updated to use unsigned short for Windows. This is another name for unsigned __int16

@bsergean
Copy link
Contributor

Thanks that should fix it, I just fired the CI to see.

Can you change the implementation file too (the .cpp one) so that things are consistent ?

@bsergean bsergean merged commit 3f1fc69 into machinezone:master Oct 22, 2021
@bsergean
Copy link
Contributor

Thanks @stryker250 ! / I have merged your change, I'll fix that small thing myself. I will make a release after.

If your company or yourself wants to, you can add a reference in the README in the USERs section, or I can do it for you if it's ok. Or do nothing, up to you :)

=> https://github.com/machinezone/IXWebSocket#users

@enzobet enzobet deleted the bug/remote_port branch October 22, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants