Eric House
5500d36cde
add and use dict manager that caches, using refcount, dicts across games. Allows multiple games to be opened, and open at the same time, with only one instance of a dict ever created. Works on linux; not used or tested yet on Android.
2014-03-09 19:12:21 -07:00
Eric House
a7c114e3f9
refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed.
2014-03-08 20:57:27 -08:00
Eric House
e34cc9007d
fix problems with opening and using wordlists on 64-bit linux by
...
making XP_U32 32 rather than 64 bits. Duh. Do same on Android jni just
in case.
2014-01-07 06:58:20 -08:00
Eric House
35c12eb7bb
add --ask-timeout param
2013-12-30 07:08:43 -08:00
Eric House
6d84dfea7e
cleanup: remove '2' from function and struct names
2013-12-30 07:08:42 -08:00
Eric House
ebdf5ed492
fix to compile on 64-bit system (untested on 32-bit :-)
2013-12-27 19:13:54 -08:00
Eric House
6bdd939531
rename field
2013-12-17 20:02:31 -08:00
Eric House
8d20c33b76
snapshot: still not correctly recording return address
2013-12-16 08:06:29 -08:00
Eric House
2a56a0ba98
snapshot: more linux-sms stuff
2013-12-12 21:08:25 -08:00
Eric House
7cffa27a88
snapshot toward implementing fake-sms as per-device rather than per-game
2013-12-11 07:54:26 -08:00
Eric House
f0c5d1f865
toward improving bt support in gtk client: add scan button that only
...
picks up devices currently open for discovery
2013-12-07 10:12:20 -08:00
Eric House
184ac28ebc
fix to compile, and in gtk case to work, when COMMON_LAYOUT defined
2013-11-03 12:15:53 -08:00
Eric House
2629c07256
Address problem with devids (e.g. GCM): until now when you got a new
...
devid you tossed your relayID and reregistered. Which meant any
existing messages meant for your relayID were orphaned, and any open
games didn't know who they belonged to until you reconnected to them
with your new relayID. So: modify the UDP protocol (though not on
Android yet) to include both relayID and devid with registration, with
one or the other an empty string if not present or not changed from
earlier. I can't fix existing clients that are dropping their
relayIDs, but when one does a re-connect without a relayID I can look
it up from the existing game record, then reuse it rather than issue a
new one. Better than nothing -- and that protocol will be obsolete
soon anyway.
2013-09-14 21:06:14 -07:00
Eric House
45998fd2c0
don't assert when packet size short is unexpectedly large. Not sure
...
why this happens, but it's not a reason to abort a test.
2013-08-21 21:28:47 -07:00
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
6418513a6d
don't try to read from socket if == -1
2013-07-22 06:15:35 -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
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
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
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
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
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
6c756533e3
fix double-dispose crash (but there's still a memory leak)
2013-06-28 20:32: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
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
bc6922cb8b
add option to split tcp packets to test whether relay can handle reassembly.
2013-06-24 06:33:06 -07:00
Eric House
5da4936e43
report unexpected received packet size as an error
2013-06-17 06:42:21 -07:00
Eric House
c8f584dad2
don't listen on stdin if it's been closed
2013-06-10 06:15:36 -07:00
Eric House
4d96b695e6
toward having commandline params show up as defaults in new game dialog
2013-05-10 07:19:32 -07:00
Eric House
d74814a806
part of previous (merge) commit that got left out -- files not saved.
2013-05-09 06:33:19 -07:00
Eric House
7d8cddb31f
Merge branch 'android_branch' into gtk_multigame
...
Conflicts:
xwords4/linux/gtkmain.c
xwords4/linux/linuxmain.c
xwords4/relay/xwrelay.cpp
2013-05-08 07:37:55 -07:00
Eric House
3e9bb1c6b9
fix leak: dispose struct before overwriting it
2013-05-08 06:38:52 -07:00
Eric House
66d42fe5f2
fix a couple of leaks
2013-05-07 07:07:10 -07:00
Eric House
195e6bfad3
add option to dump an .xwd file, meant to replace dawg2dict.pl which
...
is becoming a pain to maintain.
2013-04-09 21:10:40 -07:00
Eric House
07cfdad699
fix to support synonyms within specials too -- for linux only so far.
...
Seems to work, though the dawg2dict.pl script is broken.
2013-04-09 07:43:04 -07:00
Eric House
3a628f4375
load new-format dict into linux client, display default faces
...
correctly, and search using alternate as well as default faces. Next:
support for alternate specials.
2013-04-06 11:43:57 -07:00
Eric House
c75ecef240
test deletion of games and generation of anonymous relayIDs
2013-01-29 07:42:10 -08:00
Eric House
4b335ab464
make function static
2013-01-26 18:36:40 -08:00
Eric House
b324a382e2
I've seen read() return 0 after being told there's something on the
...
socket. So in that case loop and try again five time -- in case the
docs are wrong that 0 means EOF? Hmmm.
2013-01-26 11:58:48 -08:00
Eric House
9f3250cb3f
make curses version use udp socket when --db param passed. There's no
...
UI for the DB and the assumption is only one game will be stored but
this should let the test script be modified to test the new protocol.
2013-01-24 07:49:49 -08:00
Eric House
12f70154a0
changes for includes-messageID-please-ack protocol addition
2013-01-23 07:43:58 -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
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
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
dddb135b9d
add more columns, and update each time game is saved
2013-01-09 06:30:52 -08:00