Skip to content

Commit a9685ba

Browse files
committed
TCP example and integration test: Running with previous changes made to Socket (moved to namespace net) and DNS resolution (callback with Error)
1 parent a59a8a4 commit a9685ba

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/tcp/service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ using Disconnect = net::tcp::Connection::Disconnect;
3636

3737
// Address to our python server: 10.0.2.2:1337
3838
// @note: This may have to be modified depending on network and server settings.
39-
net::tcp::Socket python_server{ {10,0,2,2} , 1337};
39+
net::Socket python_server{ {10,0,2,2} , 1337};
4040

4141
// Called when data is received on client (incoming connection)
4242
void handle_client_on_read(Connection_ptr python, const std::string& request) {

test/net/integration/tcp/service.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void OUTGOING_TEST_INTERNET(const HostAddress& address) {
7777
// This needs correct setup to work
7878
INFO("TEST", "Outgoing Internet Connection (%s:%u)", address.first.c_str(), address.second);
7979
Inet4::stack<0>().resolve(address.first,
80-
[port](auto ip_address) {
80+
[port](auto ip_address, Error&) {
8181
CHECK(ip_address != 0, "Resolved host");
8282

8383
if(ip_address != 0)
@@ -97,7 +97,7 @@ void OUTGOING_TEST_INTERNET(const HostAddress& address) {
9797
/*
9898
TEST: Outgoing Connection to Host
9999
*/
100-
void OUTGOING_TEST(tcp::Socket outgoing) {
100+
void OUTGOING_TEST(Socket outgoing) {
101101
INFO("TEST", "Outgoing Connection (%s)", outgoing.to_string().c_str());
102102
Inet4::stack<0>().tcp().connect(outgoing, [](tcp::Connection_ptr conn)
103103
{

0 commit comments

Comments
 (0)