Skip to content

Commit

Permalink
add io 2 io test code from plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
freeeyes committed Sep 21, 2023
1 parent 16be6c0 commit 314c051
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Module_Logic/Test_Logic/BaseCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion PSS_ASIO_CLIENT/PSS_ASIO_CLIENT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 314c051

Please sign in to comment.