dhbaird / easywsclient

A short and sweet WebSocket client for C++
MIT License
745 stars 205 forks source link

Fix build error of IPPROTO_TCP on android #95

Closed Hanks10100 closed 3 years ago

Hanks10100 commented 3 years ago

I got the following error when build this lib by source on android:

easywsclient.cpp:522:24: error: use of undeclared identifier 'IPPROTO_TCP'
    setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof(flag)); // Disable Nagle's algorithm
                       ^
1 error generated.

Add a header #include <netinet/in.h> fixed it.

dhbaird commented 3 years ago

Thank you!!