File tree Expand file tree Collapse file tree
contract-tests/sse-contract-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,30 +5,6 @@ the other.
55
66This project implements the test service for the C++ EventSource client.
77
8- ### Usage
9-
10- ``` bash
11- sse-tests [PORT] [--use-curl]
12- ```
13-
14- - ` PORT ` : Optional port number (defaults to 8123)
15- - ` --use-curl ` : Optional flag to use the CURL-based SSE client implementation instead of the default Boost.Beast/Foxy implementation
16-
17- Examples:
18- ``` bash
19- # Start on default port 8123 with Foxy client
20- ./sse-tests
21-
22- # Start on port 9000 with Foxy client
23- ./sse-tests 9000
24-
25- # Start on default port with CURL client
26- ./sse-tests --use-curl
27-
28- # Start on port 9000 with CURL client
29- ./sse-tests 9000 --use-curl
30- ```
31-
328** session (session.hpp)**
339
3410This provides a simple REST API for creating/destroying
Original file line number Diff line number Diff line change @@ -22,14 +22,9 @@ int main(int argc, char* argv[]) {
2222
2323 std::string const default_port = " 8123" ;
2424 std::string port = default_port;
25-
26- // Parse command line arguments
27- for (int i = 1 ; i < argc; ++i) {
28- std::string arg = argv[i]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
29- if (i == 1 && arg.find (" --" ) != 0 ) {
30- // First non-flag argument is the port
31- port = arg;
32- }
25+ if (argc == 2 ) {
26+ port =
27+ argv[1 ]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
3328 }
3429
3530 try {
You can’t perform that action at this time.
0 commit comments