Eric House
06bc80fcc9
let's make 1 the default number of threads
2013-01-26 20:59:27 -08:00
Eric House
cba04e4b95
Merge branch 'android_branch' into gtk_multigame
...
Conflicts:
xwords4/relay/xwrelay.cpp
2013-01-26 20:20:54 -08:00
Eric House
2fdcea54f5
fix logging of sockets
2013-01-26 18:55:55 -08:00
Eric House
7ecf57c556
increase size of buffer for incoming proxy packets, since now that I
...
have 50+ saved network games requests for moves are that big. (This
is a temporary fix.)
2013-01-26 18:48:57 -08:00
Eric House
336e3cd289
handle all three types of message in a single thread, punting all
...
synchronization issues to a future point where the load demands it.
2013-01-26 11:54:48 -08:00
Eric House
9e1d09648d
fix log statement
2013-01-26 11:04:20 -08:00
Eric House
8cb0a8a7a7
fix crash on startup (as done already on gtk branch)
2013-01-26 09:23:44 -08:00
Eric House
7ee402d2ae
move callback into queueelem so same queue can service udp and tcp (eventually)
2013-01-25 07:19:44 -08:00
Eric House
23b7e5a2eb
fix syntax error in query
2013-01-24 21:11:15 -08:00
Eric House
af58e7c4e1
comment
2013-01-24 20:27:56 -08:00
Eric House
084643ca82
don't include dead-game messages when fetching for devices
2013-01-24 20:27:36 -08:00
Eric House
7253cfa313
assert that map.insert() is actually doing something in those cases
...
where I expect it to.
2013-01-24 19:34:20 -08:00
Eric House
036c908b72
remove token from XWPDEV_HAVEMSGS message
2013-01-24 19:33:33 -08:00
Eric House
5f2d628855
update protocol description
2013-01-24 19:33:02 -08:00
Eric House
55c117c9fc
fix assert by nulling out variable
2013-01-24 19:25:32 -08:00
Eric House
481e50aaae
don't bother pushing do-we-ack decision out of static method
2013-01-24 19:23:05 -08:00
Eric House
c465a0bb0c
add loop to print when packets haven't been ack'd
2013-01-24 07:43:24 -08:00
Eric House
ce7cdab3f0
add msgid and acking to protocol -- maybe for debugging only.
2013-01-23 07:40:52 -08:00
Eric House
ff70e3fbc2
fix use of map.insert: check for existing key and overwrite value
2013-01-23 07:35:20 -08:00
Eric House
2d7977e4b5
fix test: unset TEXT column returns as "", not NULL.
2013-01-22 06:52:50 -08:00
Eric House
29acab1ef2
tweak display
2013-01-21 19:44:08 -08:00
Eric House
90b8f966f6
comment out unnecessary assert
2013-01-21 19:40:56 -08:00
Eric House
2744e8698c
optionally (compile-time change for now) store message data as
...
b64-encoded TEXT instead of BYTEA, which on my laptop is getting
corrupted sometimes.
2013-01-21 19:40:20 -08:00
Eric House
d374d0f3d8
optionally (compile-time change for now) store message data as
...
b64-encoded TEXT instead of BYTEA, which on my laptop is getting
corrupted sometimes.
2013-01-21 19:39:57 -08:00
Eric House
991cc8f04c
fail in main mode if udp socket not set
2013-01-20 21:03:43 -08:00
Eric House
21570ec9b4
Merge remote-tracking branch 'origin/android_branch' into gtk_multigame
2013-01-20 19:27:25 -08:00
Eric House
016b16a8b2
change relay alert message format to length-plus-string rather than
...
null-terminated for easier handling on the java end.
2013-01-20 13:06:34 -08:00
Eric House
9023440a88
reply with alert to any connection attempt when in maint mode
2013-01-20 10:03:20 -08:00
Eric House
b768d8fccc
fall through to using hard-coded maxsocks value
2013-01-20 09:22:35 -08:00
Eric House
3313c776ab
fix unregister sql error
2013-01-19 22:37:12 -08:00
Eric House
65e9789c3f
add mainentance mode, triggered by a commandline flag, that does
...
nothing but loop waiting for connections on the UDP socket and sending
them back the error message provided on the commandline.
2013-01-19 15:17:51 -08:00
Eric House
63d3f70cdf
more changes to storage and fetching of messages and to protocol so
...
presence of messages is reported on connect (as are bad relayIDs).
Now a game with a robot player in a "closed" game can continue. Once
the next set of linux-side chances is committed.
2013-01-19 14:34:04 -08:00
Eric House
99307e45a0
queue incoming packets and process them in order in a separate thread
2013-01-18 19:56:21 -08:00
Eric House
c999bbae92
always test those last-minute pre-checkin cleanups
2013-01-18 07:22:56 -08:00
Eric House
3984d85795
oops -- prev checkin didn't compile
2013-01-18 07:12:26 -08:00
Eric House
1c5fef6a38
relay improvements for UDP connection: record addresses, prepare to
...
run in separate thread, etc.
2013-01-18 07:10:47 -08:00
Eric House
932778f700
stubbed-out thread manager for udp connection
2013-01-18 06:57:57 -08:00
Eric House
7fec736947
add udp socket and protocol for use over it so that a device can
...
manage a single connection to the relay for all of its games. Works
so far to the extent that the game's playable with all boards on the
same device (with checkins about to come) as long as all boards are
open. (Client doesn't handle opening closed games yet.)
2013-01-15 18:41:17 -08:00
Eric House
5a51af489a
Merge branch 'android_branch' into gtk_multigame
2013-01-13 10:41:14 -08:00
Eric House
dc0cfdf001
bug in recent changes: need to mark socket unused to avoid double removal
2013-01-13 10:37:47 -08:00
Eric House
98679c8363
cleanup: better encapsulation for AddrInfo
2013-01-13 10:14:06 -08:00
Eric House
c567647a8d
get rid of mapping of socket->game_connection, which will not work
...
once UDP sockets and/or per-device (not per-game) connections come
along. Lots of changes, most not involving code flow but a couple
that did. So far two gtk games can connect and exchange moves.
Haven't tested reconnection or store-and-forward.
2013-01-12 16:09:24 -08:00
Eric House
33735ae7a5
Merge branch 'android_branch' into gtk_multigame
2013-01-11 20:48:44 -08:00
Eric House
b46df07237
Merge remote branch 'origin/android_branch' into android_branch
2013-01-11 20:48:04 -08:00
Eric House
6dcd7022d4
don't pass .css file in; it's ignored
2013-01-11 20:42:57 -08:00
Eric House
55514719be
include thread ptr in hung threads logging; assert (restart) when hung for too long
2013-01-11 20:42:04 -08:00
Eric House
39d12d088a
use usleep when waiting for cref to be available
2013-01-11 20:37:08 -08:00
Eric House
aed2b6135c
Merge branch 'android_branch' into gtk_multigame
2013-01-10 21:10:48 -08:00
Eric House
2ccc297463
make number of sockets at which we assert/reboot configurable so tests
...
can be done with large numbers of clients.
2013-01-10 21:10:18 -08:00
Eric House
7437a71aa6
use string_printf
2013-01-09 06:29:12 -08:00