Eric House
71ea59e7fb
separate whether app is using udp from whether it stores games in a
...
sqlite3 db so that it can switch mid-game -- that being something that
needs testing.
2013-08-07 21:09:48 -07:00
Eric House
b9450589c8
add new commandline option --use-udp. Not yet used.
2013-08-06 21:10:42 -07:00
Eric House
da54b1e5fb
add keepalive timers
2013-08-02 08:01:16 -07:00
Eric House
63ad3a196b
debug build asserts that packet is meant for this device, but
...
non-debug should drop those that aren't.
2013-07-29 07:30:46 -07:00
Eric House
d8a4b5ce29
include udp maxInterval, the number of seconds the relay's configured
...
to assume an address is still good when it hasn't heard from it, in
reg response reply, send that reply always, and read and log the new
field on clients. It will eventually be used to implement a
keepalive.
2013-07-29 07:27:30 -07:00
Eric House
6418513a6d
don't try to read from socket if == -1
2013-07-22 06:15:35 -07:00
Eric House
3a14b12cc5
exit when number of core files changes, not if it's non-zero
2013-07-20 12:52:32 -07:00
Eric House
49a2d099f0
include packet num in every udp packet. They start over on app
...
reboot, but add a bit of help with debugging.
2013-07-20 11:57:10 -07:00
Eric House
27d9f3de45
Don't enable chat when more than 128 messages are in queue to prevent
...
an extremely unlikely cause of stalls -- and make tests trip over full
queues less often.
2013-07-18 07:37:45 -07:00
Eric House
3f59b31d51
Log received udp messages as b64-encoded strings. These match what the
...
relay's now logging
2013-07-18 07:07:25 -07:00
Eric House
1e6ff9b33c
include seed in chat messages to make sure they're unique
2013-07-18 07:06:20 -07:00
Eric House
93a7c7f817
fix to compile when DEBUG not defined
2013-07-17 06:52:35 -07:00
Eric House
d6fd79be44
log, and be more aggressive about closing, sockets on which errors occur
2013-07-16 06:43:30 -07:00
Eric House
e6e7154c82
close socket rather than proceed with what looks like a bad packet/connection
2013-07-16 06:42:21 -07:00
Eric House
27e90c2d2c
exit as soon as there's a core file
2013-07-15 07:16:35 -07:00
Eric House
8a4e766b32
make 50% of games communicate via UDP by default
2013-07-11 20:39:40 -07:00
Eric House
491b288631
assert that the seed's preserved for curses version too (where
...
clientToken is otherwise ignored since there's only one game per app
instance)
2013-07-11 20:39:10 -07:00
Eric House
9db54a5461
make linux version's gameToken combine game's seed with rowid so we
...
can test that the relay is keeping them straight
2013-07-11 20:01:17 -07:00
Eric House
d6658c5c08
don't show other_disconnected error message
2013-07-10 23:14:48 -07:00
Eric House
7dfd19a7a2
name change
2013-07-10 23:14:24 -07:00
Eric House
a522266ce4
add message checksumming for android too by making it part of util
...
(compiled out by default)
2013-07-10 08:05:47 -07:00
Eric House
4bde445c48
fix so gtk mode works too by providing storage for CurGameInfo
2013-07-09 18:19:22 -07:00
Eric House
5a20cc282c
fix so curses app works well enough that discon_ok2.sh script runs
...
successfully. GTK mode is untested and certainly broken.
2013-07-09 18:10:41 -07:00
Eric House
48fbf15a69
needed to quote variable
2013-07-09 18:07:03 -07:00
Eric House
f5696334a9
changes to get the merged code to compile but not included by git in the commit
2013-07-09 07:25:23 -07:00
Eric House
d50c808f96
Merge branch 'android_branch' into gtk_multigame
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java
xwords4/common/comms.c
xwords4/linux/cursesmain.c
xwords4/linux/cursesmain.h
xwords4/linux/gtkmain.c
xwords4/linux/gtkmain.h
xwords4/linux/linuxmain.c
xwords4/linux/main.h
xwords4/linux/scripts/discon_ok2.sh
xwords4/relay/xwrelay.cpp
(Note: The curses app crashes on exit with mempool assertions, but that's a problem before the merge.)
2013-07-09 07:18:00 -07:00
Eric House
923d41e0ee
fix to compile when DEBUG not set
2013-07-07 13:17:26 -07:00
Eric House
4b5af7ebdf
don't try to read from socket after it's been closed
2013-07-04 12:37:55 -07:00
Eric House
6cd3ebd780
improve logging
2013-07-02 18:31:02 -07:00
Eric House
0ac5d6d9e2
don't send more than three unanswered chats per boot -- to avoid
...
filling up the queues in a way that doesn't reflect real use.
2013-07-02 18:30:23 -07:00
Eric House
dd48cea912
don't log string before it's initialized
2013-07-02 07:26:32 -07:00
Eric House
9fca3792cf
don't pile on chat messages when relay isn't even connected: it's an
...
unfair test that doesn't duplicate what users will likely do.
2013-07-02 05:53:58 -07:00
Eric House
9ceb1615b3
replace tabs with spaces
2013-06-30 17:24:33 -07:00
Eric House
070590b3c2
cleanup
2013-06-30 08:34:09 -07:00
Eric House
b506a91068
add commandline params
2013-06-30 08:33:58 -07:00
Eric House
195f873ab0
tweak logging
2013-06-30 07:37:35 -07:00
Eric House
6fbf2d4a8b
use g_compute_checksum_for_data, removing self-written equivalent
2013-06-30 07:36:56 -07:00
Eric House
7efbfab0e5
fix crash in debug version: len of data to be summed needs to be 32 bits!
2013-06-30 06:50:57 -07:00
Eric House
1a73ab26ac
tweak logging
2013-06-28 20:33:27 -07:00
Eric House
17eda4e5e1
move md5sum code into separate function that relay can copy
2013-06-28 20:33:12 -07:00
Eric House
6c756533e3
fix double-dispose crash (but there's still a memory leak)
2013-06-28 20:32:19 -07:00
Eric House
5c284fe6b0
test PID is live before killing it
2013-06-28 18:55:19 -07:00
Eric House
292982a4b4
when splitting packet, queue them and send on timer rather than
...
sleeping the main thread.
2013-06-27 07:00:36 -07:00
Eric House
0bb4f5b0f5
fix occasional memory leak
2013-06-26 00:41:16 -07:00
Eric House
8324b9c770
fix compile error by making HELP another command.
2013-06-26 00:39:58 -07:00
Eric House
7967966982
Merge remote-tracking branch 'origin/android_branch' into local_fix_relay
...
Conflicts:
xwords4/linux/linuxmain.c
xwords4/linux/main.h
2013-06-25 06:18:43 -07:00
Eric House
5612bb000b
quick hack to allow testing intermix of chat with normal moves
2013-06-24 18:37:49 -07:00
Eric House
5842654418
fix pattern
2013-06-24 07:30:38 -07:00
Eric House
aca3a96b54
fix pattern so ended games are detected
2013-06-24 07:18:53 -07:00
Eric House
bc6922cb8b
add option to split tcp packets to test whether relay can handle reassembly.
2013-06-24 06:33:06 -07:00