Commit graph

25 commits

Author SHA1 Message Date
ehouse
a07a5f2822 cleanup; replace a bunch of EvtAddEventToQueue calls with
postEmptyEvent; pass transport type with incoming packets so they can
be rejected if not on expected channel (to stop IR, which is always
on, from injecting into a BT game); do BT work and fire timers even
when menu is down; don't let robot run until after board is drawn for
the first time; on startup, don't let robot run until after board is
drawn once.  Up version to b3.
2007-12-09 01:59:15 +00:00
ehouse
619e7d14c0 call util_addrChange prior to closing comms to fix crash moving from
BT to standalone game; add a couple of similar assertions; up beta
version.
2007-12-07 07:50:19 +00:00
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
41936fe18a Byte-swap psm field to callback on ARM: now both client and host work. Move SDP-related constants out where linux can use too. 2007-11-03 22:04:06 +00:00
ehouse
cb2990b720 add const to a few formal param declarations 2006-10-15 13:53:17 +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
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
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
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +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
9abf6f8970 add a const 2005-07-30 01:48:17 +00:00
ehouse
77d7bc9fa7 add const 2005-07-23 15:21:23 +00:00
ehouse
5b3e5fbf18 name change 2005-07-06 00:58:20 +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
ehouse
31e1a46087 separate internalization of comms from call to connect to relay since
the first must finish before the caller will have a valid reference to
comms.  call util_addrChange.
2005-04-03 17:00:59 +00:00
ehouse
3d27d0d882 add comms_getInitialAddr 2005-04-03 02:48:50 +00:00
ehouse
fc6095255d listen port goes away; add separate union member for relay addressing 2005-03-19 21:46:51 +00:00
ehouse
ef828a0bdf fix misspelling 2005-03-09 15:12:57 +00:00
ehouse
49e4c1f6e4 keep hostname as well as IP address in CommsAddrRec 2005-01-31 03:31:50 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00