Skip to content

Commit 502f021

Browse files
committed
embedded help for httpd tool
1 parent b0b451d commit 502f021

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

httpd.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ int main(int argc, char** argv)
1414
{
1515
if (argc != 3)
1616
{
17-
std::cerr << "Usage: httpd <port> <host>" << std::endl;
18-
std::cerr << " ./a.out 9090 127.0.0.1" << std::endl;
19-
std::cerr << " ./a.out 9090 0.0.0.0" << std::endl;
17+
std::cerr << "Usage: " << argv[0]
18+
<< " <port> <host>" << std::endl;
19+
std::cerr << " " << argv[0] << " 9090 127.0.0.1" << std::endl;
20+
std::cerr << " " << argv[0] << " 9090 0.0.0.0" << std::endl;
2021
return 1;
2122
}
2223

makefile

+26-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,32 @@ httpd:
189189
ixwebsocket/IXConnectionState.cpp \
190190
ixwebsocket/IXUrlParser.cpp \
191191
ixwebsocket/IXSelectInterrupt.cpp \
192-
ixwebsocket/apple/IXSetThreadName_apple.cpp -lz
192+
ixwebsocket/apple/IXSetThreadName_apple.cpp \
193+
-lz
194+
195+
httpd_linux:
196+
g++ --std=c++11 -o ixhttpd httpd.cpp -Iixwebsocket \
197+
ixwebsocket/IXSelectInterruptFactory.cpp \
198+
ixwebsocket/IXCancellationRequest.cpp \
199+
ixwebsocket/IXSocketTLSOptions.cpp \
200+
ixwebsocket/IXUserAgent.cpp \
201+
ixwebsocket/IXDNSLookup.cpp \
202+
ixwebsocket/IXBench.cpp \
203+
ixwebsocket/IXWebSocketHttpHeaders.cpp \
204+
ixwebsocket/IXSelectInterruptPipe.cpp \
205+
ixwebsocket/IXHttp.cpp \
206+
ixwebsocket/IXSocketConnect.cpp \
207+
ixwebsocket/IXSocket.cpp \
208+
ixwebsocket/IXSocketServer.cpp \
209+
ixwebsocket/IXNetSystem.cpp \
210+
ixwebsocket/IXHttpServer.cpp \
211+
ixwebsocket/IXSocketFactory.cpp \
212+
ixwebsocket/IXConnectionState.cpp \
213+
ixwebsocket/IXUrlParser.cpp \
214+
ixwebsocket/IXSelectInterrupt.cpp \
215+
ixwebsocket/linux/IXSetThreadName_linux.cpp \
216+
-lz -lpthread
217+
cp -f ixhttpd /usr/local/bin
193218

194219
# For the fork that is configured with appveyor
195220
rebase_upstream:

0 commit comments

Comments
 (0)