Skip to content

Commit

Permalink
Parameter set to save bandwidth on ultra-constrained links
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Jun 4, 2013
1 parent f960a8b commit 979c2a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/frontend/stmclient.cc
Expand Up @@ -249,7 +249,7 @@ void STMClient::main_init( void )
network = new Network::Transport< Network::UserStream, Terminal::Complete >( blank, local_terminal,
key.c_str(), ip.c_str(), port );

network->set_send_delay( 1 ); /* minimal delay on outgoing keystrokes */
network->set_send_delay( 400 ); /* minimal delay on outgoing keystrokes */

/* tell server the size of the terminal */
network->get_current_state().push_back( Parser::Resize( window_size.ws_col, window_size.ws_row ) );
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/terminaloverlay.h
Expand Up @@ -294,7 +294,7 @@ namespace Overlay {
last_quick_confirmation( 0 ),
send_interval( 250 ),
last_height( 0 ), last_width( 0 ),
display_preference( Adaptive )
display_preference( Experimental )
{
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/network/transportsender.cc
Expand Up @@ -59,7 +59,7 @@ TransportSender<MyState>::TransportSender( Connection *s_connection, MyState &in
shutdown_start( -1 ),
ack_num( 0 ),
pending_data_ack( false ),
SEND_MINDELAY( 8 ),
SEND_MINDELAY( 500 ),
last_heard( 0 ),
prng(),
mindelay_clock( -1 )
Expand Down Expand Up @@ -298,6 +298,8 @@ const string TransportSender<MyState>::make_chaff( void )
const size_t CHAFF_MAX = 16;
const size_t chaff_len = prng.uint8() % (CHAFF_MAX + 1);

return string(); /* disable chaff */

char chaff[ CHAFF_MAX ];
prng.fill( chaff, chaff_len );
return string( chaff, chaff_len );
Expand Down
8 changes: 4 additions & 4 deletions src/network/transportsender.h
Expand Up @@ -49,10 +49,10 @@ using namespace TransportBuffers;

namespace Network {
/* timing parameters */
const int SEND_INTERVAL_MIN = 20; /* ms between frames */
const int SEND_INTERVAL_MAX = 250; /* ms between frames */
const int ACK_INTERVAL = 3000; /* ms between empty acks */
const int ACK_DELAY = 100; /* ms before delayed ack */
const int SEND_INTERVAL_MIN = 1000; /* ms between frames */
const int SEND_INTERVAL_MAX = 1001; /* ms between frames */
const int ACK_INTERVAL = 60000; /* ms between empty acks */
const int ACK_DELAY = 1000; /* ms before delayed ack */
const int SHUTDOWN_RETRIES = 16; /* number of shutdown packets to send before giving up */
const int ACTIVE_RETRY_TIMEOUT = 10000; /* attempt to resend at frame rate */

Expand Down

0 comments on commit 979c2a1

Please sign in to comment.