duplicating set of sockets owned by a cref, moving it from cinfo into
cref and caching a copy outside when cref is unclaimed (after which no
change is possible until it's claimed again.)
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.
(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.
remove the artificial limit on number of stored messages. This seems
to fix problems where lots of chats in a row clog up the relay so that
messages never get flowing again. Works more cleanly than
artificially ACKing.
RECONN or CONN that lists the game as full. This means we get the
all-green icon (or the A in the gtk case) when in a consummated game
rather than only when all devices are actually connected.
message to be sent next time it does. And since the cookieID will
change and should be there already anyway, remove it. (Should remove
the hostID too for the same reason.)
connName/hid pair. This works around a problem where a device,
continuing to connect and send all pending messages for another device
that is not connecting, winds up with hundreds of identical messages
stored.
memory. Confirmed that devices can hookup without ever being
connected at the same time and that the messages survive a relay
reboot. No further testing yet.
recycling of crefs between when devices in a game connect. This plus
movement of messages into the DB will re-enable games played without
the two devices ever being connected at the same time.
ALLCOND until it's time to kill the cref. When one device connects
and leaves the cref is recycled, so when a new device joins and is
assigned the same game and a new cref is initialized the number of
players already registered must be set from the db entry; do that.
HostRec. This fixes failure to reconnect so that now a complete game
is possible (gtk version) without the two devices every being
connected at the same time.
consistent: nJoined in DB tracks players "ever seen and issued
connName" rather than "currently connected". Next step: debug game
between two devices never connected at same time.
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.