diff --git a/Module_Logic/Test_Logic/BaseCommand.cpp b/Module_Logic/Test_Logic/BaseCommand.cpp index 392243a..8563ed4 100644 --- a/Module_Logic/Test_Logic/BaseCommand.cpp +++ b/Module_Logic/Test_Logic/BaseCommand.cpp @@ -50,11 +50,11 @@ void CBaseCommand::init(ISessionService* session_service) //测试连接tcp logic_connect_tcp(); - - PSS_LOGGER_DEBUG("[CBaseCommand::init]****create listen begin."); //测试创建监听 test_create_io_listen(); - PSS_LOGGER_DEBUG("[CBaseCommand::init]****create listen end."); + + //建立点对点的透传连接 + test_io_2_io(); #endif PSS_LOGGER_DEBUG("[CBaseCommand::init]({0})io thread count.", session_service_->get_io_work_thread_count()); @@ -106,10 +106,10 @@ void CBaseCommand::logic_connect_udp() void CBaseCommand::test_io_2_io() { - //测试io 2 to 透传代码 + //测试io 2 to 透传代码(将10092 桥接到 10003上) _ClientIPInfo from_io; from_io.m_strClientIP = "127.0.0.1"; - from_io.m_u2Port = 10012; + from_io.m_u2Port = 10092; _ClientIPInfo to_io; to_io.m_strClientIP = "127.0.0.1"; diff --git a/PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.cpp b/PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.cpp index 7704d9a..428d271 100644 --- a/PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.cpp +++ b/PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.cpp @@ -343,7 +343,7 @@ int main() io_context.run(); }); - tcp_test_io_2_io("127.0.0.1", 10012, 10010, 0x2101, 1, io_context); + tcp_test_io_2_io("127.0.0.1", 10012, 10092, 0x2101, 1, io_context); tcp_test_connect_synchronize_server("127.0.0.1", 10002, 10010, 0x2101, 1, io_context); tcp_test_connect_synchronize_server("127.0.0.1", 10002, 10011, 0x2102, 1, io_context);