of which is TBD). When a new-version client connects, store the value
it's passed. At first this will let me track how quickly people
upgrade. Later I can use it to let different clients have different
formats to their messages e.g. to proxy.
existing store-and-forward system. With this checkin a robot-vs-robot
game plays for quite a few moves without either game every loaded into
the foreground (via a BoardActivity instance on Android), with all
moves transmitted as a result of relay checks. One of the games
refuses to open later, however, and there are certainly other bugs.
And I'm not sure what happens when a message sent no-conn (without a
cookie ID) is received in the foreground. But this is progress.
new error message rather than allow it as if it were a normal game
only to send a game-dead message after. This solves the problem of
how device knows not to put up welcoming message or suggestion to
invite to a game that's suddenly missing players. BUT: this change is
incompatible with existing versions and so needs to get pushed out
before the in-use relay can be upgraded to include this code.
dying with an assert. Log something -- but still die as there's
nothing to be done in code except hope some connections don't
reconnect right away. Fixes: 'ulimit -n' or edit 'nofile' param in
/etc/security/limits.conf on the relay host.
reconnect. I was putting both (i.e. the same device twice) in the
same game. Now I detect this based on the seed being duplicated and
treat the device as having failed to ACK then proceed with the CONNECT
as if it were new. Tested pretty heavily but only with two-device
games.
prevents race conditions that are turning up when I'm running multiple
threads -- by allowing me to really not be running multiple threads.
Tested with the usual script.
(including seed so it's harder to spoof); respond to that by setting a
DEAD column in the db and flagging the device as gone. Notify any
connected device of the fact. Refuse to accept new connections to
that game. As already-connected devices reconnect, allow them to do
so but send a new status message that their game is dead. Not heavily
tested yet.
problem where, on PRX_HAS_MSGS path only, device reading socket gets
EOF early though logging here confirms additional bytes have been
written. Gross but effective.
ahead of processing data arrived on the same socket, with EnqueueKill
that adds to same queue from which data's taken. So if device dies
immediately after sending data there won't be a race between closing
the cref (if this is the last open socket) and handling the data. I'm
still dying with assert fails when running 100 games at once, but much
less frequently
game works to completion with both signing up as guests (no -s) with
one local and one remote player (identical commandlines.) Not yet
tested: if any signs up as a host, reconnecting rather than
connecting, etc. This is just a snapshot.
device id, to relay, one for each stored game that's communicating via
the relay. Relay parses out each relayID. Next relay can use these
to look up whether messages are available and reply with that, and
device can put up a notification.