ehouse
e1d5632a7b
Re-add direct-via-ip transport, and implement for linux in order to
...
better test heartbeats. Fix so can play against Palm over BT.
Assertions failing on Linux when reset, but it's otherwise done.
2007-11-26 02:58:25 +00:00
ehouse
4c8cf98d24
Add and set a compile-time option so comms will set a periodic timer
...
and use it to send and check for heartbeats over any transport.
Caller must supply a reset proc which is called when heartbeat hasn't
been received in too long. No changes required to comms protocol, but
that means the heartbeat interval is fixed at compile time: can't be
negotiated, and the two ends had better agree. Currently tested with
linux host and PalmOS guest, where only the first heartbeat failure is
recovered from. So there's some debugging to be done still.
2007-11-18 23:43:27 +00:00
ehouse
473d506611
add logging to help catch a recurring assertion
2007-09-15 13:46:59 +00:00
ehouse
242e71f04a
What I meant to check in. Need to save first....
2007-03-18 23:38:53 +00:00
ehouse
a4fb5a6d5a
Always send BT reconnet message, even if there are messages to resend.
...
Fixes failure to reconnect when opening a saved BT game where the
other device is waiting and will need to resend.
2007-03-18 23:38:19 +00:00
ehouse
c0b515457b
Cleanup: compile warning and to make logging easier.
2007-02-08 15:17:23 +00:00
ehouse
a424d54445
Add a one-byte header to BT messages so one device can signal another
...
that a new game's begun without dropping the connection. On Palm,
remove connection-drop on new game. With this change starting a new
game takes imperciptible time, down from 30 seconds.
2007-02-08 02:53:10 +00:00
ehouse
ff82dd61c0
Fix linked-list bug in removeFromQueue.
2007-02-07 11:58:01 +00:00
ehouse
3028c9e598
deal with case where guest begins new game but connects to host that's
...
running the old game: the host may reply, but guest must not take that
as evidence of a connection having been established: don't remove sent
messages (this isn't an ACK), and don't assert later on.
2007-02-06 05:49:45 +00:00
ehouse
9a61f5c38b
Add assert; don't call comms if has been set to null (fixes device
...
reset); fix failure to install connCB (removes need to manually resend
messages when client starts up first.)
2007-02-04 17:13:01 +00:00
ehouse
e6ba8c872c
fix crash when linux is bt server: if no addr provided it's not a duplicate.
2007-01-09 02:43:09 +00:00
ehouse
02c225c413
Fix so IR-only multi-device build works again.
2007-01-06 16:46:45 +00:00
ehouse
e2f3a55611
reject initial messages coming in on the same address a second time.
...
Fixes problem that surfaces when clients are more agressive about
resending early in game.
2006-11-11 22:37:36 +00:00
ehouse
d234fc637d
make IR the default conn type on Palm, where it's been the only type
...
until now.
2006-10-15 14:09:17 +00:00
ehouse
cb2990b720
add const to a few formal param declarations
2006-10-15 13:53:17 +00:00
ehouse
5f25ba9f57
remove BEYOND_IR, replacing with XWFEATURE_RELAY and
...
XWFEATURE_BLUETOOTH. The goal is to be able to build to support
bluetooth only, or relay/ip only, e.g. for a palm bluetooth beta.
Seems to work.
2006-10-10 01:34:37 +00:00
ehouse
277624eb81
Don't return from middle of function.
2006-10-07 03:37:40 +00:00
ehouse
878acbc759
Fix opening games and messages saved by last shipping version on Palm
...
by checking version and loading new fields conditionally. (Not yet
tested for current wince version.)
2006-10-05 01:17:03 +00:00
ehouse
715d01b8a4
Put relay-only fields into a struct for easier identification. No code change.
2006-10-02 14:26:56 +00:00
ehouse
9837d8cca7
Fix longstanding bug removing too few messages from queue on ACK.
...
Print queue as part of stats.
2006-09-27 01:54:53 +00:00
ehouse
12731c59cb
fix ARM crash loading bt game saved on 68K: specify sizeof array
...
rather than struct wrapping it.
2006-09-23 16:04:53 +00:00
ehouse
04c5401711
What I meant to check in. F***ing emacs. :-)
2006-09-23 15:22:26 +00:00
ehouse
e10d05eff0
On bringup for bluetooth, resend any waiting messages rather than an
...
empty new one to get the connection started. This increases the
chances new games will connect without user having to hit resend.
2006-09-23 15:18:01 +00:00
ehouse
8667bb77bf
remove over-agressive attempt to detect out-of-order messages that was
...
breaking IR comms.
2006-09-17 05:06:46 +00:00
ehouse
e627d7f670
do a better job of rejecting messages that have strayed in from a different game.
2006-09-15 07:33:59 +00:00
ehouse
100598a35f
Make formal param const; add initial value to relay-only field so
...
asserts don't fail b/c of uninitialized value; don't typedef array:
make array field of struct.
2006-09-14 01:25:40 +00:00
ehouse
2c5d15a8dd
remove param from util_addrChange; add comms_getIsServer; save bt_addr
...
as part of comms.
2006-09-08 07:14:24 +00:00
ehouse
209da1b042
use stream_getSize to detect corrupt (truncated) messages.
2006-08-29 13:18:12 +00:00
ehouse
74c6b241d7
Put up BT device browser while user is picking connection method
...
rather than when trying to send for first time, then pass address
through from conns dialog to bt code.
2006-08-26 21:12:10 +00:00
ehouse
0c915e61b0
First shot at bluetooth support (turned off in Makefile by default).
...
A full robot vs. robot game now works between two Treos. Added UI to
choose BT as transport mechanism, and added new send proc to establish
socket connection between host and guest. Works only for two devices:
no piconet yet. No error recovery, ability to quit game in middle,
start new game, etc.
2006-08-23 04:44:55 +00:00
ehouse
4daabf6fe5
Set -Wunused-parameter for those versions of gcc that support it, and
...
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)). There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
46cd6e8536
add ifdef for compile with some optional condition
2006-06-16 01:46:47 +00:00
ehouse
b10ca04e07
don't exclude BEYOND_IR-only fields
2006-04-07 03:08:23 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
cda5996195
fix unset var warning
2005-10-30 16:14:13 +00:00
ehouse
6835b6d1eb
New scheme for accepting and limiting reconnections. Now device must
...
send player counts, local and expected. Based on these the relay
accepts connections, declares the game full and ready for message
forwarding, and decides whether to accept a reconnect.
2005-10-02 15:39:38 +00:00
ehouse
c5add889cb
make transmitted vars smaller where possible; new relay identifying
...
scheme where cookie is used only to connect, and is replaced for
reconnects by a relay-generated name that's supposed to be unique
across all games on all relays; let relay assign non-servers' hostIDs
rather than doing 'em randomly; use hostIDs for comms-level protocol's
channelNo where possible to avoid tripping over duplicate messages
2005-10-01 16:01:39 +00:00
ehouse
5c01044e8c
send disconnect message to relay before starting a new game.
2005-09-05 15:33:51 +00:00
ehouse
6f8b33a05b
reset cookieID for a new game
2005-09-04 20:30:47 +00:00
ehouse
59edec4955
handle OTHER_CONNECT message by resending any unACKed messages.
2005-09-03 18:31:32 +00:00
ehouse
abbd1a072f
handle other-disconnected error message
2005-09-03 15:37:49 +00:00
ehouse
ab0e833a9b
Receive disconnect events and display message for error codes.
2005-09-03 06:57:01 +00:00
ehouse
39fa5728ef
send XWRELAY_RECONNECT
2005-09-02 06:26:33 +00:00
ehouse
24fb48008f
cleanup for wince compile
2005-07-23 15:28:15 +00:00
ehouse
3b53363e16
Pass protocol version code with connect request, and return error if
...
it isn't what relay can handle. Report error to user.
2005-07-06 01:36:52 +00:00
ehouse
5b3e5fbf18
name change
2005-07-06 00:58:20 +00:00
ehouse
1ae6c010c9
Make cookieID a 32-bit value instead of 16-bit
2005-07-05 23:02:15 +00:00
ehouse
327fb7b001
eliminate unnecessary setHeartbeatTimer call
2005-07-05 20:57:37 +00:00
ehouse
978d840df7
put back functions that never should have been removed.
2005-06-27 05:45:28 +00:00
ehouse
e92234b324
cleanup: make module-local functions static
2005-06-25 05:43:56 +00:00