Eric House
659278448b
changes to work against remote relay
2010-09-22 05:45:40 -07:00
Eric House
076b211cab
tweak to allow to specify host/port for use against remote relay
2010-09-21 20:38:54 -07:00
Andy2
1d0c207521
add test command for proxy feature to fetch for connNames whether
...
there are messages pending for them. Not handled yet on relay.
2010-09-21 18:28:31 -07:00
Andy2
e06baf566f
get public rooms from the db rather than stubbing it out.
2010-09-21 06:54:47 -07:00
Andy2
be23e06b60
use read_packet to replace duplicate code
2010-09-21 06:38:43 -07:00
Andy2
e7b5923883
finish first pass at sending open public room names -- but with actual
...
list harvesting stubbed out.
2010-09-21 06:27:31 -07:00
Andy2
2ec67c8ed1
finish rq to work with current format; add to makefile
2010-09-21 06:26:49 -07:00
Eric House
4ad735124c
add logging and assertions. There's a race condition in cref
...
recycling and may be one in tpool socket checking-out.
2010-09-20 22:11:13 -07:00
Eric House
b6ce74be1c
add timeout after which all games are killed
2010-09-20 22:08:51 -07:00
Eric House
c671f2ab05
plug memory leak
2010-09-20 22:07:10 -07:00
Eric House
047f41b516
send cookieid as part of [RE]CONNECT_RESPONSE in addition to ALL_COND (where it's now redundant).
2010-09-20 22:06:35 -07:00
Andy2
0df651027f
Merge branch 'android_branch' into relay_proxy
...
Conflicts:
xwords4/relay/crefmgr.cpp
2010-09-20 19:55:53 -07:00
Andy2
bca8300495
changes for b16: version strings and changes summary text.
2010-09-20 19:48:52 -07:00
Andy2
ddedcee3eb
remove commented out foo -- needed to save before prev submission.
2010-09-20 19:39:35 -07:00
Andy2
9b98d89722
add mimeType entry to data. This coupled with the right apache
...
AddType config means the browser doesn't get a chance to download
dicts, giving users one less way to get confused.
2010-09-20 19:38:26 -07:00
Andy2
0ac23458ba
use constant
2010-09-20 18:42:43 -07:00
Andy2
a549ade1fa
a bit more work on rc
2010-09-20 18:31:17 -07:00
Andy2
4e9d6e712e
escape apostrophe -- new SDK requires it.
2010-09-20 06:18:53 -07:00
Andy2
15cd3af62a
just a comment
2010-09-20 05:35:29 -07:00
Andy2
e1c99f53cd
work on detecting duplicate packets and devices that have reconnected
...
on a different socket; print all present seeds for debugging.
2010-09-20 05:35:19 -07:00
Andy2
ac8891016f
work on detecting duplicate packets and devices that have reconnected
...
on a different socket; print all present seeds for debugging.
2010-09-20 05:35:09 -07:00
Andy2
d199ec5168
account for possibility client apps won't exit on TERM
2010-09-20 05:33:58 -07:00
Andy2
84a26c2c1a
more to ignore
2010-09-20 05:32:17 -07:00
Andy2
430b033ae0
a bit of progress on cmdline tool
2010-09-20 04:59:09 -07:00
Andy2
6d6ad96cde
don't clear seed when changing roles from guest to host.
2010-09-20 04:56:19 -07:00
Andy2
00cdbc97d3
Install a no-op TERM handler at first then replace later with one that
...
just exits main loop. Do cleanup/file saving on exit from mainloop.
Fixes occasional crash where TERM came in before we were setup to
cleanup.
2010-09-20 04:55:35 -07:00
Andy2
df1ec1628a
replace killSocket(), which jumped right into crefmgr and could get
...
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
2010-09-18 08:47:56 -07:00
Andy2
a4913596db
remove logging
2010-09-18 08:42:15 -07:00
Andy2
c5d113a8da
remove _locked from name of method since it's not called when holding a lock.
2010-09-18 07:46:10 -07:00
Andy2
53b3d7c32f
enque sockets in new object that contains type so later other events
...
(e.g. socket closes) can also be queued; track what sockets are
currently being handled so no two threads are ever processing events
on same socket. This makes running 'NGAMES=50
./scripts/discon_ok2.sh' crash very infrequently rather than every
time, but the race condition in crefmgr remains. Queuing socket
closes should help.
2010-09-18 07:44:14 -07:00
Andy2
54512b9e11
put logs in own dir
2010-09-18 07:35:16 -07:00
Andy2
eec07649a6
put logs in own dir; echo every time game ends successfully.
2010-09-18 07:35:02 -07:00
Andy2
9c8889b429
get rid of mutex guarding reconnect. There shouldn't be any need
...
since game slots are already assigned, and it's slowing down
reconnects in their race with kills.
2010-09-18 05:07:23 -07:00
Andy2
7e1066dbcc
vary room names
2010-09-16 22:20:43 -07:00
Eric House
bb1e46fa81
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
2010-09-16 20:13:54 -07:00
Eric House
d0e707a48e
get started with test/cmdline app to query relay's new proxy interface.
2010-09-16 20:13:24 -07:00
Andy2
c5eef29bcc
some suspicious crashes and subsequent reading say that multiple
...
threads can't share the same db connection. So synchronize all
queries. Multiple threads *can* access the db concurrently as long as
each has its own connection, so I could add connections to the tpool
threads. But this will probably be performant enough for the first
10K simultaneous users. :-)
2010-09-16 20:08:32 -07:00
Andy2
1490b2def9
simplify state table, getting rid of a bunch of states: we never leave
...
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.
2010-09-16 18:59:56 -07:00
Andy2
76e7459a6d
various improvements, e.g. random sleeps before and after starting
2010-09-16 18:56:34 -07:00
Andy2
50c387d75e
remove players from db as well as runtime when ack times out
2010-09-16 06:49:35 -07:00
Andy2
ca6039e890
new test script attempting to mimic real-world usage
2010-09-16 05:39:50 -07:00
Andy2
25c1824c45
fix broken assertion and add missing state transitions to fix crashes.
2010-09-16 05:39:25 -07:00
Andy2
2b702b48d6
need to clear CID of record in DB when killing corresponding in-memory
...
cref or reconnect will fail.
2010-09-16 04:47:17 -07:00
Andy2
452e3fc86b
timeout in milliseconds instead of seconds
2010-09-16 04:46:04 -07:00
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