Skip to content

Commit

Permalink
remove release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh0g0-1758 committed Nov 7, 2024
1 parent 14f458f commit d5cfc48
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ jobs:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
build_type: [Debug]
compiler:
- { cc: gcc-13, cxx: g++-13 }
- { cc: clang, cxx: clang++ }

steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions apps/bidirectional_stream_copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void bidirectional_stream_copy( Socket& socket, string_view peer_name )
},
[&] { _outbound.writer().close(); },
[&] {
cerr << "DEBUG: Outbound stream had error from source.\n";
// cerr << "DEBUG: Outbound stream had error from source.\n";
_outbound.set_error();
_inbound.set_error();
} );
Expand All @@ -62,15 +62,15 @@ void bidirectional_stream_copy( Socket& socket, string_view peer_name )
if ( _outbound.reader().is_finished() ) {
socket.shutdown( SHUT_WR );
_outbound_shutdown = true;
cerr << "DEBUG: Outbound stream to " << peer_name << " finished.\n";
// cerr << "DEBUG: Outbound stream to " << peer_name << " finished.\n";
}
},
[&] {
return _outbound.reader().bytes_buffered() or ( _outbound.reader().is_finished() and not _outbound_shutdown );
},
[&] { _outbound.writer().close(); },
[&] {
cerr << "DEBUG: Outbound stream had error from destination.\n";
// cerr << "DEBUG: Outbound stream had error from destination.\n";
_outbound.set_error();
_inbound.set_error();
} );
Expand All @@ -95,7 +95,7 @@ void bidirectional_stream_copy( Socket& socket, string_view peer_name )
},
[&] { _inbound.writer().close(); },
[&] {
cerr << "DEBUG: Inbound stream had error from source.\n";
// cerr << "DEBUG: Inbound stream had error from source.\n";
_outbound.set_error();
_inbound.set_error();
} );
Expand All @@ -112,16 +112,16 @@ void bidirectional_stream_copy( Socket& socket, string_view peer_name )
if ( _inbound.reader().is_finished() ) {
_output.close();
_inbound_shutdown = true;
cerr << "DEBUG: Inbound stream from " << peer_name << " finished"
<< ( _inbound.has_error() ? " uncleanly.\n" : ".\n" );
// cerr << "DEBUG: Inbound stream from " << peer_name << " finished"
// << ( _inbound.has_error() ? " uncleanly.\n" : ".\n" );
}
},
[&] {
return _inbound.reader().bytes_buffered() or ( _inbound.reader().is_finished() and not _inbound_shutdown );
},
[&] { _inbound.writer().close(); },
[&] {
cerr << "DEBUG: Inbound stream had error from destination.\n";
// cerr << "DEBUG: Inbound stream had error from destination.\n";
_outbound.set_error();
_inbound.set_error();
} );
Expand Down
34 changes: 17 additions & 17 deletions util/tcp_minnow_socket_impl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void TCPMinnowSocket<AdaptT>::_initialize_TCP( const TCPConfig& config )

// debugging output:
if ( _thread_data.eof() and _tcp.value().sender().sequence_numbers_in_flight() == 0 and not _fully_acked ) {
std::cerr << "DEBUG: minnow outbound stream to " << _datagram_adapter.config().destination.to_string()
<< " has been fully acknowledged.\n";
// std::cerr << "DEBUG: minnow outbound stream to " << _datagram_adapter.config().destination.to_string()
// << " has been fully acknowledged.\n";
_fully_acked = true;
}
},
Expand All @@ -115,10 +115,10 @@ void TCPMinnowSocket<AdaptT>::_initialize_TCP( const TCPConfig& config )
_outbound_shutdown = true;

// debugging output:
std::cerr << "DEBUG: minnow outbound stream to " << _datagram_adapter.config().destination.to_string()
<< " finished (" << _tcp.value().sender().sequence_numbers_in_flight() << " seqno"
<< ( _tcp.value().sender().sequence_numbers_in_flight() == 1 ? "" : "s" )
<< " still in flight).\n";
// std::cerr << "DEBUG: minnow outbound stream to " << _datagram_adapter.config().destination.to_string()
// << " finished (" << _tcp.value().sender().sequence_numbers_in_flight() << " seqno"
// << ( _tcp.value().sender().sequence_numbers_in_flight() == 1 ? "" : "s" )
// << " still in flight).\n";
}

_tcp->push( [&]( auto x ) { _datagram_adapter.write( x ); } );
Expand Down Expand Up @@ -157,8 +157,8 @@ void TCPMinnowSocket<AdaptT>::_initialize_TCP( const TCPConfig& config )
_inbound_shutdown = true;

// debugging output:
std::cerr << "DEBUG: minnow inbound stream from " << _datagram_adapter.config().destination.to_string()
<< " finished " << ( inbound.has_error() ? "uncleanly.\n" : "cleanly.\n" );
// std::cerr << "DEBUG: minnow inbound stream from " << _datagram_adapter.config().destination.to_string()
// << " finished " << ( inbound.has_error() ? "uncleanly.\n" : "cleanly.\n" );
}
},
[&] {
Expand All @@ -168,7 +168,7 @@ void TCPMinnowSocket<AdaptT>::_initialize_TCP( const TCPConfig& config )
},
[&] {},
[&] {
std::cerr << "DEBUG: minnow inbound stream had error.\n";
// std::cerr << "DEBUG: minnow inbound stream had error.\n";
_tcp->inbound_reader().set_error();
} );
}
Expand Down Expand Up @@ -211,7 +211,7 @@ void TCPMinnowSocket<AdaptT>::wait_until_closed()
{
shutdown( SHUT_RDWR );
if ( _tcp_thread.joinable() ) {
std::cerr << "DEBUG: minnow waiting for clean shutdown... ";
// std::cerr << "DEBUG: minnow waiting for clean shutdown... ";
_tcp_thread.join();
std::cerr << "done.\n";
}
Expand All @@ -230,7 +230,7 @@ void TCPMinnowSocket<AdaptT>::connect( const TCPConfig& c_tcp, const FdAdapterCo

_datagram_adapter.config_mut() = c_ad;

std::cerr << "DEBUG: minnow connecting to " << c_ad.destination.to_string() << "...\n";
// std::cerr << "DEBUG: minnow connecting to " << c_ad.destination.to_string() << "...\n";

if ( not _tcp.has_value() ) {
throw std::runtime_error( "TCPPeer not successfully initialized" );
Expand All @@ -244,9 +244,9 @@ void TCPMinnowSocket<AdaptT>::connect( const TCPConfig& c_tcp, const FdAdapterCo

_tcp_loop( [&] { return _tcp->sender().sequence_numbers_in_flight() == 1; } );
if ( _tcp->inbound_reader().has_error() ) {
std::cerr << "DEBUG: minnow error on connecting to " << c_ad.destination.to_string() << ".\n";
// std::cerr << "DEBUG: minnow error on connecting to " << c_ad.destination.to_string() << ".\n";
} else {
std::cerr << "DEBUG: minnow successfully connected to " << c_ad.destination.to_string() << ".\n";
// std::cerr << "DEBUG: minnow successfully connected to " << c_ad.destination.to_string() << ".\n";
}

_tcp_thread = std::thread( &TCPMinnowSocket::_tcp_main, this );
Expand All @@ -266,9 +266,9 @@ void TCPMinnowSocket<AdaptT>::listen_and_accept( const TCPConfig& c_tcp, const F
_datagram_adapter.config_mut() = c_ad;
_datagram_adapter.set_listening( true );

std::cerr << "DEBUG: minnow listening for incoming connection...\n";
// std::cerr << "DEBUG: minnow listening for incoming connection...\n";
_tcp_loop( [&] { return ( not _tcp->has_ackno() ) or ( _tcp->sender().sequence_numbers_in_flight() ); } );
std::cerr << "DEBUG: minnow new connection from " << _datagram_adapter.config().destination.to_string() << ".\n";
// std::cerr << "DEBUG: minnow new connection from " << _datagram_adapter.config().destination.to_string() << ".\n";

_tcp_thread = std::thread( &TCPMinnowSocket::_tcp_main, this );
}
Expand All @@ -283,8 +283,8 @@ void TCPMinnowSocket<AdaptT>::_tcp_main()
_tcp_loop( [] { return true; } );
shutdown( SHUT_RDWR );
if ( not _tcp.value().active() ) {
std::cerr << "DEBUG: minnow TCP connection finished "
<< ( _tcp->inbound_reader().has_error() ? "uncleanly.\n" : "cleanly.\n" );
// std::cerr << "DEBUG: minnow TCP connection finished "
// << ( _tcp->inbound_reader().has_error() ? "uncleanly.\n" : "cleanly.\n" );
}
_tcp.reset();
} catch ( const std::exception& e ) {
Expand Down

0 comments on commit d5cfc48

Please sign in to comment.