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
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
Andy2
54d49d450a
add back state and table entries to get rid of an unused cref.
2010-09-11 01:40:40 -07:00
Andy2
463e9c3ccf
pass langCode in reconnect case too
2010-09-11 01:23:39 -07:00
Andy2
dc957e1a92
add match test on language code and number of players
2010-09-10 13:45:40 -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
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
f7c5ff619d
turn off heartbeats
2010-09-10 01:24:03 -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
33d60452a3
fork a thread to handle proxy connects. Later may want to use thread
...
pool as for game threads.
2010-08-23 18:52:52 -07:00
Andy2
a34ccb424f
device now passes list of "relayID"s, consisting of connName plus
...
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.
2010-08-22 12:16:57 -07:00
Andy2
56b6a425e2
proxy now writes one byte to relay and reads one byte reply.
2010-08-19 18:34:28 -07:00
Andy2
019da83d60
meant to check this in
2010-08-12 06:42:59 -07:00
Andy2
416b379781
add second class of socket to be listened on, meant for per-device
...
rather than per-game connection, and when adding connected sockets to
active set track the type.
2010-08-12 06:42:33 -07:00
eehouse@eehouse.org
3b7abc2a31
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-07-29 21:13:00 -07:00
Eric House
e857b01783
ignore logs and core files
2010-07-29 21:07:20 -07:00
Eric House
d7a3795355
add static decl
2010-07-29 21:04:33 -07:00
Eric House
d7d2a7523b
kill cref when in bad state.
2010-07-29 19:46:52 -07:00
eehouse@eehouse.org
13ecb2f929
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-07-29 05:41:48 -07:00
Eric House
b170a04dec
drop duplicate [re]connect packets before they enter the state
...
machine. Fixes problems where crefs get stuck in the
XWS_CHK_ALLHERE_2 state. Still should probably kill a cref where
there's no state table entry.
2010-07-28 22:21:01 -07:00
Eric House
f70b9e1d10
use constructor to save some code; no behavior change
2010-07-28 20:17:54 -07:00
eehouse@eehouse.org
958ec15a19
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-07-27 21:32:17 -07:00
Eric House
ad1be65236
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-07-27 20:47:42 -07:00
Eric House
b335151172
log when no event pushed while adding players -- this may be how state machine is getting screwed up
2010-07-27 20:47:04 -07:00
Andy2
51ffdce185
comment out pthread_create failure log; seeing it too often and it's
...
just for the web view.
2010-07-26 18:37:44 -07:00
Andy2
f05bfcb3d8
log when dropping message that would mess up cref player counts
2010-07-16 06:23:20 -07:00
Eric House
a52fc5a4fd
don't call removeSocket when none was added
2010-07-15 18:21:32 -07:00
Eric House
8e5abb189b
add mutex for reconns too; log socket and ip addr connecting on it
2010-07-15 18:14:44 -07:00
Eric House
5ea1f3b470
list newest crefs first
2010-07-15 18:13:01 -07:00
Eric House
78f965b979
replace asserts that have been firing on integrating reconn events
...
with dropping the reconn messages; move log of state table lookup failure
into cref so cref id can be included
2010-07-14 21:32:19 -07:00
eehouse@eehouse.org
f9d8df8cea
don't track xwrelay.conf so local changes don't show as local mods
2010-07-14 06:29:50 -07:00
Andy2
41f8f574b1
use git describe for version info/stamp
2010-07-07 20:26:25 -07:00
Andy2
5365ea4f4e
fix crash when empty string given on ctrl port
2010-07-07 18:59:48 -07:00
Eric House
6456165a92
replace svnversion with gitversion.sh
2010-06-05 07:27:14 -07:00
Eric House
8aaaa06bcb
identify rev number as from git
2010-06-05 07:25:24 -07:00
ehouse
43181f5cd2
accept multiple cref ids and names on console
2010-06-03 03:00:35 +00:00
eehouse
8bb2fb9b09
track and display in web view the number of games actually joined
...
rather than the number attempted.
2010-05-28 02:31:27 +00:00
eehouse
c92d919934
log error from read
2010-05-26 02:25:58 +00:00
eehouse
7a279702c0
add sterrror to what's logged when pthread_create fails -- as is
...
happening often.
2010-05-20 04:28:07 +00:00
eehouse
3e83f50c84
use strcasecmp rather than strcmp on cookies (room names) to make
...
rooms case insensitive.
2010-05-01 02:49:19 +00:00
eehouse
4ed87fecb4
add once-per-day date line to logs since they can span weeks now.
2010-05-01 02:48:47 +00:00
eehouse
f4b64fe97d
add option, off by default, to stall each message forward by some time
...
to better simulate network conditions when testing against local relay.
2010-03-28 16:09:07 +00:00
eehouse
e5f3384050
another .gitignore
2010-02-24 04:30:21 +00:00
ehouse
7ac98bfcfb
Don't require a timeout waiting for a game to connect initially, and
...
make no timeout the default.
2009-12-27 18:17:24 +00:00
ehouse
a1be2fb8fc
add ports relay is listening on to http display
2009-12-16 02:43:52 +00:00
ehouse
fc17df2a7e
When guest connects, check if providing too many players before
...
reponding to connection request so that we just deny the request (with
new error code) rather than revoking it later.
2009-12-14 04:10:23 +00:00
ehouse
015b0d42d8
include title in head with summary readable in tab
2009-12-08 14:51:03 +00:00
ehouse
26469d734c
Modify state machine and return new error codes to force host to
...
connect first, guests second, with clear error messages if the order's
wrong. This seems to make it simpler for users to get a connection
right. Code holding multiple games worth of hosts and guests in a
cref is gone.
2009-12-04 08:03:27 +00:00