Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions example/chat_server_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Thurman Gillespy
*
* Copyright (c) 2019 Thurman Gillespy
* 4/17/19
* 4/30/19
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -55,28 +55,28 @@ bool process_args(int argc, char* const argv[], std::string& ip_addr,
" default port = " + PORT + "\n"
" server IP address (fixed) = " + LOCAL_LOOP + " (local loop)";

const std::string HELP = "-h";
const std::string ERR = "-e";
const std::string HELP_PRM = "-h";
const std::string ERR_PRM = "-e";

// set default values
ip_addr = LOCAL_LOOP;
port = PORT;

if (argc > 3 || (argc == 2 && argv[1] == HELP)) {
if (argc > 3 || (argc == 2 && argv[1] == HELP_PRM)) {
std::cout << USAGE << std::endl;
return EXIT_FAILURE;
}

if (argc == 2) {
if (argv[1] == ERR) {
if (argv[1] == ERR_PRM) {
print_errors = true;
} else {
port = argv[1];
}
}

if (argc == 3) {
if (argv[1] == ERR) {
if (argv[1] == ERR_PRM) {
print_errors = true;
port = argv[2];
} else {
Expand Down
6 changes: 3 additions & 3 deletions example/echo_binary_text_client_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author Thurman Gillespy
*
* Copyright (c) Thurman Gillespy
* 4/26/19
* 4/30/19
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -45,7 +45,7 @@ using endpoint = asio::ip::tcp::endpoint;
// process command line args (if any)
bool process_args(int argc, char* argv[], bool& print_errors, std::string& ip_address,
std::string& port) {
const std::string HELP = "-h";
const std::string HELP_PRM = "-h";
const std::string PRINT_ERRS = "-e";
const std::string USEAGE = \
"useage: ./echo_client [-h | -e] [ip address/hostname] [port]\n"
Expand All @@ -58,7 +58,7 @@ bool process_args(int argc, char* argv[], bool& print_errors, std::string& ip_ad

int offset = 0;

if (argc > 4 || (argc > 1 && argv[1] == HELP)) {
if (argc > 4 || (argc > 1 && argv[1] == HELP_PRM)) {
std::cout << USEAGE << std::endl;
return EXIT_FAILURE;
}
Expand Down
4 changes: 2 additions & 2 deletions example/echo_binary_text_server_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using endpoint = asio::ip::tcp::endpoint;

// process command line args (if any)
bool processArgs(int argc, char* argv[], bool& print_errors, std::string& port) {
const std::string HELP = "-h";
const std::string HELP_PRM = "-h";
const std::string PRINT_ERRS = "-e";
const std::string USEAGE = \
"useage: ./echo_server [-h | -e] [port]\n"
Expand All @@ -53,7 +53,7 @@ bool processArgs(int argc, char* argv[], bool& print_errors, std::string& port)
" port Default: 5002";
int offset = 0;

if (argc > 3 || (argc > 1 && argv[1] == HELP)) {
if (argc > 3 || (argc > 1 && argv[1] == HELP_PRM)) {
std::cout << USEAGE << std::endl;
return EXIT_FAILURE;
}
Expand Down
12 changes: 6 additions & 6 deletions example/simple_chat_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Thurman Gillespy
*
* Copyright (c) 2019 Thurman Gillespy
* 4/19/19
* 4/30/19
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -122,9 +122,9 @@ bool process_args(int argc, char* const argv[], std::string& ip_addr,
" default ip address: " + LOCAL_LOOP + " (local loop)\n"
" default port: " + PORT + "\n"
" if connection type = accept, IP address becomes \"\"";
const std::string HELP = "-h";
const std::string ERR = "-e";
const std::string EMPTY = "";
const std::string HELP_PRM = "-h";
const std::string PRINT_ERRS = "-e";

int offset = 0; // 1 when -e 1st parameter

// set default values
Expand All @@ -137,10 +137,10 @@ bool process_args(int argc, char* const argv[], std::string& ip_addr,
return EXIT_FAILURE;
};

if (argv[1] == HELP) {
if (argv[1] == HELP_PRM) {
std::cout << USAGE << std::endl;
return EXIT_FAILURE;
} else if (argv[1] == ERR) {
} else if (argv[1] == PRINT_ERRS) {
print_errors = true;
offset = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/basic_io_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <cstddef> // std::size_t, std::byte
#include <utility> // std::forward, std::move

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

#include "net_ip/net_ip_error.hpp"
#include "net_ip/queue_stats.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/component/send_to_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "net_ip/queue_stats.hpp"

#include "utility/erase_where.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

namespace chops {
namespace net {
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/detail/io_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "net_ip/detail/output_queue.hpp"
#include "net_ip/queue_stats.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

namespace chops {
namespace net {
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/detail/output_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <optional>

#include "net_ip/queue_stats.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

namespace chops {
namespace net {
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/detail/tcp_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "net_ip/queue_stats.hpp"
#include "net_ip/net_ip_error.hpp"
#include "net_ip/basic_io_interface.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

namespace chops {
namespace net {
Expand Down
2 changes: 1 addition & 1 deletion include/net_ip/detail/udp_entity_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "net_ip/queue_stats.hpp"
#include "net_ip/net_ip_error.hpp"
#include "net_ip/basic_io_interface.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

namespace chops {
namespace net {
Expand Down
2 changes: 1 addition & 1 deletion test/include/net_ip/shared_utility_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#include <boost/endian/conversion.hpp>

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/repeat.hpp"
#include "utility/make_byte_array.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/basic_io_interface_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "net_ip/shared_utility_test.hpp"

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/make_byte_array.hpp"

template <typename IOT>
Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/component/send_to_all_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "net_ip/component/send_to_all.hpp"

#include "net_ip/queue_stats.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

#include "net_ip/shared_utility_test.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/detail/tcp_acceptor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "net_ip/endpoints_resolver.hpp"

#include "net_ip/shared_utility_test.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/repeat.hpp"


Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/detail/tcp_connector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

#include "net_ip/endpoints_resolver.hpp"

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/repeat.hpp"

#include <iostream> // std::cerr for error sink
Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/detail/tcp_io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "net_ip/endpoints_resolver.hpp"

#include "net_ip/shared_utility_test.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

// #include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/detail/udp_entity_io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "net_ip/shared_utility_test.hpp"
#include "net_ip/shared_utility_func_test.hpp"

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/repeat.hpp"
#include "utility/make_byte_array.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/net_ip_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "net_ip/shared_utility_test.hpp"
#include "net_ip/shared_utility_func_test.hpp"

#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"
#include "utility/repeat.hpp"

#include <iostream> // std::cerr for error sink
Expand Down
2 changes: 1 addition & 1 deletion test/net_ip/shared_utility_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "asio/buffer.hpp"

#include "utility/make_byte_array.hpp"
#include "utility/shared_buffer.hpp"
#include "marshall/shared_buffer.hpp"

#include "net_ip/basic_io_interface.hpp"
#include "net_ip/io_interface.hpp"
Expand Down