Avery Pennarun
7d674e9e37
ssnet: throw a nicer-looking Fatal when the mux connection dies.
...
When it happens, it's probably because the client died and the server hasn't
noticed yet.
2010-05-02 20:53:29 -04:00
Avery Pennarun
ca14231aae
Whoops, we were spinning in the server when the mux outbuf was full.
...
Once again, the buffering gets mixed up with the selecting. Seems to be the
story of my life.
2010-05-02 06:17:43 -04:00
Avery Pennarun
6c2dc54b9e
More latency fixes: use a PING/PONG pair to limit queue length.
...
It seems ssh is kind of stupid and uses a really big SO_SNDBUF (hundreds of
kbytes). Thus, we can't depend on the socket's output buffer to limit our
latency down to something reasonable. Instead, limit the amount of data we
can send in a single round trip.
2010-05-02 05:39:17 -04:00
Avery Pennarun
5d1390927d
Don't overfill the mux's output buffer.
...
Otherwise a single busy stream can ruin it for everybody.
2010-05-02 05:06:51 -04:00
Avery Pennarun
da06286427
ssnet: when a connection error occurs, stop trying to connect.
2010-05-02 03:52:46 -04:00
Avery Pennarun
9b23fd2c01
Do non-blocking connect().
...
This way we don't freeze the entire proxy when someone tries to connect to a
nonexistent IP address (oops).
2010-05-02 02:43:10 -04:00
Avery Pennarun
2dd328ada4
Add a -v (and -vv) flag and decrease default message verbosity.
2010-05-02 02:14:20 -04:00
Avery Pennarun
10069f99e2
Clean up SockWrapper.peername stuff.
...
Some fds don't have peernames, and sometimes the peername isn't very
helpful, so let's fill it in by hand when appropriate.
2010-05-02 01:52:05 -04:00
Avery Pennarun
bfd506dcdc
Improve some debugging information to find the weird data problem.
...
Turns out list.pop() removes the *last* item, not the first one. Oops. It
all works great for queues of only one item... :)
2010-05-02 01:25:09 -04:00
Avery Pennarun
915a96b0ec
We now have a server that works... some of the time.
...
There still seem to be some weird timing and/or closing-related bugs, since
I can't load the eqldata project correctly unless I use --noserver.
2010-05-02 00:52:06 -04:00
Avery Pennarun
d435c41bdb
stdin and stdout have different fds, so make SockWrapper take *two* socks.
...
We'll need this when we have a SockWrapper pointing at a Mux on a subprocess
pipe.
2010-05-01 23:32:30 -04:00
Avery Pennarun
5f0bfb5d9e
Basic implementation of a multiplex protocol - client side only.
...
Currently the 'server' is just a pipe to run 'hd' (hexdump) for looking at
the client-side results. Lame, but true.
2010-05-01 23:14:42 -04:00
Avery Pennarun
550048370e
Move some code that'll be useful for the server into ssnet.py.
2010-05-01 20:48:11 -04:00