Commit graph

17 commits

Author SHA1 Message Date
ehouse
c2ad749f99 Change util function to use signed type; other cleanup to compile with various features. 2007-12-05 06:28:51 +00:00
ehouse
b527110379 replace all __FUNCTION__ with __func__ 2007-12-02 19:13:25 +00:00
ehouse
75b42f36c3 Add files forgotten with last checkin; add additional parameter to
addListener so listeners can be removed on reset.
2007-11-28 03:59:26 +00:00
ehouse
42615345c9 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
321acd1d42 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
476e164aa1 Deal with incoming fragmented rfcomm packets; log packet contents. 2007-11-15 14:40:56 +00:00
ehouse
29bb6a7ca9 quick hack at framing rfcomm packets 2007-11-14 05:53:28 +00:00
ehouse
5d3e641082 Add ability via compile-time flag to connect via rfcom rather than
l2cap.  Works with two caveats: assumes l2cap-style complete packets
(no framing), and has problems with linux sdp system's tendency to
retain records long after sessions are closed.
2007-11-13 15:20:33 +00:00
ehouse
b7044a2dab Fix typo breaking compile. 2007-11-05 03:42:27 +00:00
ehouse
ebd158ef35 Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Log btaddr after converting from name.
2007-11-05 03:38:00 +00:00
ehouse
81aa3f9d2e Update BT code to advertise and search sdp records and use psm reported to work with new Palm
code.  Get rid of pthreads dependency which was for logging only.
2007-11-05 03:17:07 +00:00
ehouse
1695cd044b Largely untested changes to allow BT in ncurses mode, centered around
integrating sockets into poll fdset; move relay and bt globals out of
a union so can test if in use without knowing current connection method.
2006-09-19 03:39:08 +00:00
ehouse
696836818c be a better master: don't try to send when not connected. 2006-09-16 15:21:27 +00:00
ehouse
29ea995a34 Get rid of separate accept thread, instead integrating listening
socket into main event loop (poll underneath).  Works for gtk; still
debugging ncurses.
2006-09-10 19:01:06 +00:00
ehouse
84a0409103 Attempt to listen for connections on a separate thread so connected
game could disconnect and reconnect, but still need work on adding a
socket to the main thread's io queue from a different thread.
2006-09-08 07:23:19 +00:00
ehouse
334ea9a546 Make linux client work as host. Currently accepts only one connection
and blocks in accept.  Need threads and a piconet.
2006-08-29 13:20:09 +00:00
ehouse
a605fd4d49 Start adding bt support to linux port. Required removing assumptions
that all connectivity was with relay and over streaming sockets (since
BT is using l2cap's datagram-style sockets.)  With this checkin, a full
robot-vs-robot game is possible with palm as host and linux as client.
Linux as host isn't started yet.
2006-08-26 21:15:20 +00:00