Andy2
4c5c435fb5
add new parameter so client always gets notified on connection
...
including how many players are still missing.
2011-05-19 05:51:00 -07:00
Eric House
7a2d279308
add logging so script can better track what state relay game is in
2010-11-18 22:27:06 -08:00
Andy2
22f7a42c1d
make comms_getChannelSeed non-static so jni can call it
2010-11-08 17:22:38 -08:00
Andy2
0d7f2c4f23
add devOrder (= hostID) to params passed on connect. Should make for
...
better explanatory message.
2010-10-29 06:31:33 -07:00
Andy2
4cd15a9c6a
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
...
Conflicts:
xwords4/common/comms.c
2010-10-29 05:27:07 -07:00
Andy2
41fc05106b
add room name to callback used when device connects
2010-10-28 18:45:55 -07:00
Eric House
eba5b77494
add comms_isConnected; public room variables default to false
2010-10-27 20:50:11 -07:00
Andy2
99dbbb443c
add comms_canChat, which knows better than java code what state a
...
connected game is in, and call it to determine whether to show the
chat icon.
2010-10-21 19:14:10 -07:00
Andy2
e637a64d96
Change param signage to fix compiler warning
2010-10-11 06:20:30 -07:00
Andy2
b742c7dbb7
add new booleans to relay address record around public rooms
2010-09-03 06:38:46 -07:00
Andy2
a34ccb424f
device now passes list of "relayID"s, consisting of connName plus
...
device id, to relay, one for each stored game that's communicating via
the relay. Relay parses out each relayID. Next relay can use these
to look up whether messages are available and reply with that, and
device can put up a notification.
2010-08-22 12:16:57 -07:00
eehouse
ea6166f8c7
add comms_resetSame that resets relay with existing params.
2010-06-05 03:39:16 +00:00
eehouse
55abf1116b
get relay port from prefs and pass into jni
2010-03-25 04:50:19 +00:00
eehouse
786541e9ae
pass default hostname in from platform code rather than compiling it
...
into jni; in java pull it from preferences and pass into jni.
2010-03-21 03:12:58 +00:00
ehouse
8450c9da2b
New callback called on first connect to relay and on first ALLHERE
...
message so users can see progress. Handle new relay message ALLBACK
meaning "ALLHERE but not for the first time".
2009-12-14 04:03:17 +00:00
ehouse
14b060707f
Report relay connection denials due to misordering out to platform,
...
and refuse to connect again until comms has been reset. This goes
with platform code to put up the new game/conns dialogs on disconnect
errors.
2009-12-04 08:14:03 +00:00
ehouse
f6fb019732
Send to relay if connected, even if not all hosts present. And detect
...
duplicate initial packets a bit better. This change goes with the
next checkin on the relay side: move to modified store-and-forward so
devices can connect at different times once the game is established.
2009-11-08 21:30:13 +00:00
ehouse
18e9301e87
rename Cookie to Invite, a change that may change. Rename everywhere
...
in clients but not in relay where cookie is too pervasive. (There are
no code changes in this checkin.)
2009-09-14 03:11:11 +00:00
ehouse
6c4b991566
Modify comms and games APIs so single struct of callbacks is passed
...
instead of multiple callbacks; add callback called when relay state
changes; adapt linux and palm clients to new API. (Wince changes
pending.)
2009-09-12 21:39:13 +00:00
ehouse
615603b66b
Add define set to number of conn types compiled in; use it to compile
...
out conn type choice where there's only one (none to be made). Refuse
to dismiss conns dialog when cookie not chosen.
2009-09-05 13:08:46 +00:00
ehouse
4909ae0137
Close down relay connection when comms going away. Fixes crashes when
...
new game is standalone and prev used relay. Add logging code in comms.
2009-03-06 13:43:03 +00:00
ehouse
213c66b391
Reset all relay-related variable on new game. Fixes bug where devices
...
couldn't switch roles or join a new game.
2009-02-28 19:27:45 +00:00
ehouse
c672fcfafd
Make it possible to run same binary against relay with relay heartbeat
...
and direct with comms heartbeat. This mostly means changing ifdefs.
2009-02-01 15:50:58 +00:00
ehouse
1755267d55
Add support to gtk app for tranport over "sms", with files containing
...
base64-encoded data as the messages. Make necessary changes to comms.
This is the foundation for doing real SMS transport on handhelds.
Currently a full robot game works for two gtk clients provided the
server is launched first.
2008-12-29 01:35:29 +00:00
ehouse
3374849111
Unify lookup by address and by channelNo; add method to check consistency of BT address.
2008-01-07 01:10:43 +00:00
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