Commit graph

3559 commits

Author SHA1 Message Date
Andy2
fa50bd00f1 timeout final scores alert 2010-09-16 03:42:57 -07:00
Andy2
d1a9c3962a rename cookie->room in db; reposition columns. 2010-09-16 03:30:24 -07:00
Andy2
b25579b893 greatly simplify state machine for connections. Now (with DEVACK=20
on conf file) newrelay.sh will complete running 50 4-device gtk games.
Haven't tested reconnect case which I almost certianly broke.
2010-09-16 01:53:43 -07:00
Andy2
0d7165f881 add ability to run gtk from newrelay.sh. Trying to run 50 instances
crashes the relay as ACKs take too long to come back.
2010-09-16 01:44:54 -07:00
Andy2
06c8fdc67f stop tracking seeds separately until have a use for 'em separate from
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.
2010-09-16 01:13:26 -07:00
Andy2
a870cac86d break connect and reconnect into separate paths to simplify. Be
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.
2010-09-15 14:05:51 -07:00
Andy2
8961910263 field name change 2010-09-15 14:03:59 -07:00
Eric House
b8a431cf01 fix bug in sql statement 2010-09-14 21:28:18 -07:00
Eric House
54d268b718 pass through to database whether room is public 2010-09-14 21:20:11 -07:00
Eric House
e3053370d0 add cmd to build the database and main table 2010-09-14 21:18:04 -07:00
Eric House
ddcc338ed7 don't break out of loop without unlocking mutex 2010-09-14 21:16:16 -07:00
Eric House
56a920740a remove unused funtion declaraion 2010-09-14 21:15:24 -07:00
Eric House
9fc39a55ed add params to set public-room-related booleans; add timeout option on
modal dialogs so gtk version can run unattended.
2010-09-14 21:13:45 -07:00
Andy2
3b5b5f0241 factor dbmgr code; add and call method to zero CIDs on boot. 2010-09-15 01:14:28 -07:00
Andy2
821e4d9c39 add ACK to protocol, returned by device after gets connName on initial
connection.  Space is held for device on assumption ack will come
back, then given up if it fails.
2010-09-14 13:54:52 -07:00
Andy2
f8c1c016cc remove special-case states and handling of first connect; track number
of players sought in the cref itself, adding in constructor, and not
in HostRec instances.  This is cleanup with no behavior change.
2010-09-13 13:49:13 -07:00
Andy2
100ed8532f timestamp records on creation 2010-09-12 05:04:52 -07:00
Andy2
ded6e22180 do finding of open games using database rather than cref list, which
requires updating the number of players when new devices join.  Drop
requirement that cid be unique.
2010-09-12 04:49:03 -07:00
Andy2
663551fcb5 improve db, adding uniqueness contraints. Pass in connName so can
meet that constraint.  Figure out next cid using a query at startup.
2010-09-12 03:57:23 -07:00
Andy2
86a1e943ca make dict settable too 2010-09-12 03:53:39 -07:00
Eric House
c1da64b96a instantiate and use the new dbmgr class 2010-09-11 19:45:04 -07:00
Eric House
87de53cf96 add new class to interface with postgres database in an experiment to
simplify things by using a db to survive a crash/reboot.  So far (with
next checkin) manages to update a db.  Next need to do queries instead
of searches through in-memory data.
2010-09-11 19:44:37 -07:00
eehouse@eehouse.org
0b46455044 Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy 2010-09-12 02:34:20 -07:00
Andy2
54d49d450a add back state and table entries to get rid of an unused cref. 2010-09-11 01:40:40 -07:00
Andy2
8908ca5b1d ignore new test script's log files 2010-09-11 01:40:05 -07:00
Andy2
1cd2d542f7 new test script 2010-09-11 01:39:20 -07:00
Andy2
d5f2a72227 note that file's out-of-date 2010-09-11 01:28:04 -07:00
Andy2
463e9c3ccf pass langCode in reconnect case too 2010-09-11 01:23:39 -07:00
Andy2
bd71a15ddc turn off heartbeats on client side 2010-09-11 01:23:13 -07:00
Andy2
dc957e1a92 add match test on language code and number of players 2010-09-10 13:45:40 -07:00
Eric House
54611df679 nuke unused variable 2010-09-10 05:55:59 -07:00
Andy2
e60495ff93 read, pass, store and display langCode. Not yet used to route
connections to crefs.
2010-09-10 01:59:37 -07:00
Andy2
b3d3673dc9 read the langcode out of dict and into common struct 2010-09-10 01:57:22 -07:00
Andy2
2ee9031fdc langcode belongs in connect, not reconnect, message 2010-09-10 01:56:58 -07:00
Andy2
20312144dd tons of changes, still rough, snapshoted here: a gtk device vs device
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.
2010-09-10 01:30:40 -07:00
Andy2
34a94f23a0 fix error message to not specify host or guest 2010-09-10 01:24:42 -07:00
Andy2
f7c5ff619d turn off heartbeats 2010-09-10 01:24:03 -07:00
eehouse@eehouse.org
a79f50053b Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy 2010-09-09 04:21:02 -07:00
Eric House
89e7a506a4 reduce amount of logging 2010-09-08 20:28:14 -07:00
Eric House
90d505abea call accept() in main thread rather than in thread proc to fix
long-standing bug where main thread kept finding socket to be readable
and forking new threads to call accept() on it and then block forever.
2010-09-08 20:24:36 -07:00
Andy2
01fe388f85 remove logging accidentally checked in 2010-09-03 06:40:17 -07:00
Andy2
e6545d8d57 set and save new booleans, etc. Relay params UI seems to work now
except for listing public rooms (still hard-coded)
2010-09-03 06:39:46 -07:00
Andy2
b742c7dbb7 add new booleans to relay address record around public rooms 2010-09-03 06:38:46 -07:00
Andy2
e20c63f38c move toward the UI I want: show public room browser or edittext for
new room name depending on checkbox, etc.  Still not fully wired.
2010-09-02 05:46:35 -07:00
Andy2
0b91e9634e save/restore new dictLang field; up stream version 2010-09-01 06:51:44 -07:00
Andy2
c6c1a93de5 copy new dictLang field java<->c 2010-09-01 06:51:09 -07:00
Andy2
6d7ff11dcc add and set new field, dictLang 2010-09-01 06:50:33 -07:00
Andy2
73746e3664 first cut at relay config section, inline this time, with refresh
button and make-public checkbox.  Neither wired up nor hidden in
non-networked case.
2010-09-01 06:49:01 -07:00
Andy2
cad2854d08 fix bug by always enabling set of widgets for local player in case
prev invocation of dialog hid it.
2010-08-31 06:21:46 -07:00
Andy2
784b5c8cdf tweak strings 2010-08-31 06:20:48 -07:00