Eric House
7b4f9ede41
cleanup: renaming only (server->host)
2024-01-04 09:50:24 -08:00
Eric House
57b78141e9
remove dead (relay) code
2023-12-04 09:31:11 -08:00
Eric House
55e36e10a7
new script to run many games per device
...
I need it to be much closer to Android....
2023-11-27 21:32:43 -08:00
Eric House
47004a0e08
linux: remove ask to accept duplicate invitations
2023-11-26 19:58:07 -08:00
Eric House
67cf8518de
pass topic to ack() (so unretain can work)
2023-11-07 19:55:32 -08:00
Eric House
e78d9fbc33
add quashed to summary, and show as part of games-list state
2023-11-06 13:11:34 -08:00
Eric House
3dcac063b5
show quashed state in net state icon (DEBUG only)
2023-11-06 13:11:34 -08:00
Eric House
259357a818
reduce sending of dead-game mqtt messages
...
Two cases dealt with here. First, if my opponent deletes the game when
I have an un-ack'd message, I'll keep sending it forever. Fix is to
flip a bit in comms in response to a game_gone event so no more
sending will happen. (Better than emptying the queue, as it leaves
open the possibility of resurrecting the game with code changes
later.) Second, if there's a retained message from a dead game I'll
keep receiving it until it's replaced, and if the game's dead it never
will be. Fix is to add a new api endpoint noSuchGame() to the relay2
server and to call it on receiving a message for which I have no game
to deliver it to. The endpoint "unretains" the message so I won't get
it again unless it's resent.
2023-11-05 12:01:43 -08:00
Eric House
ee2a4aaf72
fix failure to deliver ACKs on MQTT
...
My combining messages logic failed for ACKs, sending the queue but not
the ACK unless the ACK was in the queue. Appending it at send time is
fraught, so I am instead adding ACKs to the queue, but not persisting
them, so they only last long enough to be sent after they're
added. Seems to fix a common problem of games failing to get ACKs for
their final messages after they finish.
2023-10-26 15:37:50 -07:00
Eric House
629696144f
Fix ARM compile by copying rather than casting struct ptr
2023-10-25 13:55:51 -07:00
Prod User
7f1eec654c
fix linux client test to compile and run on Anlinux proot on Android tablet
2023-08-14 08:11:01 -07:00
Eric House
76c0ce3a2e
add common/ to saved logs
...
This is risky because requires that the untested way I map threads to
env always work -- but the risk is to DEBUG builds only.
2023-07-18 16:07:26 -07:00
Eric House
185f25953d
cleanup: add an assert and remove some logging
2023-07-01 12:14:07 -07:00
Eric House
bc0478abbf
include player-specific dicts in gi_copy
2023-05-21 08:40:59 -07:00
Eric House
4dbb7362dd
add dbg-only menuitem to set mqtt devid
2023-04-26 13:57:21 -07:00
Eric House
3c56490c01
fix to read any length string from stream
2023-04-21 17:50:01 -07:00
Eric House
dc0c63dc24
don't crash if chat message length > 255 bytes
...
Crash instead if exceeds 1K. That needs a more complex fix.
2023-04-21 16:51:52 -07:00
Eric House
8c60b99e82
remove some asserts Frank's seeing
2023-04-20 14:24:10 -07:00
Eric House
f9d3f9fd4e
fix assertions around dropped (because ancient) messages
...
I'm seeing these only when opening games several years old, and they
shouldn't matter on release builds. Still....
2023-04-18 20:55:46 -07:00
Eric House
f8c5a4ea58
add assert
2023-04-18 20:55:46 -07:00
Eric House
131826d34f
fix release build
2023-04-06 20:22:29 -07:00
Eric House
9a5b1d466d
send invites as invites, not messages
...
Fixes sending of invitations on Android
2023-04-06 19:54:50 -07:00
Eric House
e09fb6776a
don't report game as deleted until it's at least connected
...
Otherwise remote might not have even saved it yet so of course it
won't exist.
2023-04-04 19:55:55 -07:00
Eric House
d0a53ab3ff
send invites as invites, not messages
...
Fixes sending of invitations on Android
2023-03-27 14:33:14 -07:00
Eric House
50ac11970e
fix assertion failure when sending single unqueued message
2023-03-26 10:37:45 -07:00
Eric House
885a20845a
don't send null msg queue
2023-03-25 15:31:15 -07:00
Eric House
1a8f91203e
Send MQTT messages in batches
...
Resend sends all types in batches. Send of new messages goes back for
MQTT only and sends the whole un-ack'd queue.
2023-03-25 10:24:39 -07:00
Eric House
326624e942
on linux, keep a queue of mqtt messages
...
Was dropping invitations that were posted before I connected to the
remote broker. Now they're kept, and sent until the broker says
publish succeeded. Better would be to have comms resend when mqtt
connects, but I'm not set up for that.
2023-03-25 10:24:39 -07:00
Eric House
7b2c327ba8
change send method to take list instead of array
2023-03-25 10:24:39 -07:00
Eric House
22d0d50130
add a public part of MsgQueueElem to simplify passing outside
2023-03-25 10:24:39 -07:00
Eric House
6ec0e64657
toward changing APIs to allow combined messages for mqtt
2023-03-25 10:24:39 -07:00
Eric House
b811653c89
remove ifdef-d out code storing all messages in one queue
2023-03-25 10:24:39 -07:00
Eric House
7929ddea47
cleanup comms
2023-03-25 10:24:39 -07:00
Eric House
daac5ca098
store messages in channel rather than a single queue
...
Moving toward being able to send in groups per device for MQTT
optimization
2023-03-16 07:44:14 -07:00
Eric House
b27384df63
print caller in logging func
2023-03-16 07:44:14 -07:00
Eric House
fb04a6ad0a
fix server_getOpenChannel()
...
Only used by gtk for now but meant to replace hardcoded invitation
code everywhere.
2023-03-16 07:44:14 -07:00
Eric House
e849d628d9
log when messages could be combined
2023-03-16 07:43:51 -07:00
Eric House
bb2a2dacae
cleanup
2023-03-08 20:48:55 -08:00
Eric House
073271fe61
tweak test script to better test rematching
2023-03-08 20:48:55 -08:00
Eric House
1083cbd525
improve test script and fix rematching bug it found
...
Server needs to not rematch if any device has more than one
player (for now, as I'm too lazy to fix this rare condition.) I'm
moving toward having the linux client write status to a unix socket on
exit rather than having the test script parse the log file for
status. GameOver is there now. Tile counts should follow.
2023-03-05 10:23:48 -08:00
Eric House
ac75da2028
fix leak rematching games on 3+ devices
2023-03-04 09:30:58 -08:00
Eric House
4ec6cfe17d
plug memory leak
2023-03-04 08:54:31 -08:00
Eric House
07cd95e715
use github code to implement md5sum for mqtt msg ack (wasm only)
2023-02-26 19:53:12 -08:00
Eric House
22bf6c596a
as copied from https://github.com/Zunawe/md5-c
2023-02-26 19:53:12 -08:00
Eric House
b758cd3f0f
respond to invitations coming in as argv params
...
including downloading wordlist if necessary
2023-02-26 19:53:12 -08:00
Eric House
32275017a6
implement rematch
2023-02-23 15:51:40 -08:00
Eric House
a0f5e2d5d4
remove dead code
2023-02-23 10:55:05 -08:00
Eric House
5382941f63
snapshot: play via MQTT works for a while
2023-02-22 19:52:45 -08:00
Eric House
78d84a941e
compiles, but untested
...
And certainly won't work!
2023-02-22 19:04:05 -08:00
Eric House
fd36590e7f
fix assertions that assumed multi-device
2023-02-21 17:32:21 -08:00