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
ae9ec31863
don't call g_main_loop_quit() from inside signal handler: it doesn't
...
work on Ubuntu LTS at least. Instead write to a "quit pipe" and exit
the loop from the pipe's reader back outside exception context.
2013-01-21 18:57:48 -08:00
Eric House
a6b3cb8cbe
add new param JNIThread requires
2013-01-20 21:34:28 -08:00
Eric House
de7c29dcc7
add comms_stop() to jni and use it
2013-01-20 21:33:35 -08:00
Eric House
132a495c4f
add explanatory comment
2013-01-20 21:32:19 -08:00
Eric House
991cc8f04c
fail in main mode if udp socket not set
2013-01-20 21:03:43 -08:00
Eric House
e79b0bd3eb
Merge branch 'gtk_multigame' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into gtk_multigame
2013-01-20 19:27:50 -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
3df0484e6a
get maintenance mode message into an alert -- and create a new common
...
superclass for Service subclasses to reuse some code.
2013-01-20 16:07:38 -08:00
Eric House
fd2f4309f4
beginning of android changes to talk udp to the relay: sufficient to
...
get back (and log, not display) a message when the relay is in
maintenance mode.
2013-01-20 15:29:51 -08:00
Eric House
93ff4f4fcb
handle the new length-plus-string format
2013-01-20 13:07:01 -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
3fc31a6fe1
new enum for alert
2013-01-20 10:04:24 -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
f06d129c24
change env variable name; provided inital board size and dict choices
2013-01-20 09:53:26 -08:00
Eric House
b768d8fccc
fall through to using hard-coded maxsocks value
2013-01-20 09:22:35 -08:00
Eric House
3dfb2e04e6
call comms_close in curses too to avoid new assert
2013-01-19 22:53:25 -08:00
Eric House
3313c776ab
fix unregister sql error
2013-01-19 22:37:12 -08:00
Eric House
3bcf5d504b
add a debug pref for turning on UDP-based networking (ignored so far)
2013-01-19 16:03:29 -08:00
Eric House
360602b3a0
fix compile failure: never meant to check this change in.
2013-01-19 16:02:58 -08:00
Eric House
6797e069bc
Merge branch 'android_branch' into gtk_multigame
2013-01-19 15:56:16 -08:00
Eric House
54ad381749
Merge remote-tracking branch 'origin/android_branch' into android_branch
2013-01-19 15:54:40 -08:00
Eric House
0ef3549a4e
handle (display) the relay's new error message
2013-01-19 15:18:36 -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
1bb9f9b1bf
handle sending of messages generated by games opened only to receive
...
messages from relay. And handle report that relayID is bad.
2013-01-19 14:37:49 -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
1519a00004
toward being able to handle messages received for closed game.
...
Receipt seems to work but send in that state doesn't.
2013-01-18 07:49:00 -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
4163309dae
Let's have just one set of signal handlers
2013-01-17 06:37:53 -08:00
Eric House
2f772c56b2
make gtk app a better test bed: add db and row to window titles,
...
implement delete button and multiple selections, etc.
2013-01-16 21:16:07 -08:00
Eric House
c33c50ee6b
add deleteGame()
2013-01-16 21:11:35 -08:00
Eric House
a6784464ff
first set of networking changes testing per-device communication with
...
relay on behalf of a number of games. Works as long as all the games
are open.
2013-01-16 06:46:33 -08:00
Eric House
f6e7ece578
add comms_stop() and an assert to make sure it's called. Explicit
...
stop and a message to the relay when using a UDP socket makes up for
there being no notification of connection closing.
2013-01-16 06:31:09 -08:00
Eric House
a107365c88
change names of two types and variables of that type to make a common
...
pattern more sensible. No code changes.
2013-01-15 19:04:20 -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