Commit graph

22 commits

Author SHA1 Message Date
ehouse
63fc1e048a Fix crash going from connected to standalone game: don't invoke sockrw
code when its "self" is null.
2009-09-20 22:23:56 +00:00
ehouse
7d48ad714f fix some warnings when building without debugging 2009-09-20 20:49:37 +00:00
ehouse
a3b326205a Do a better job of handling failure to connect or loss of connection:
look for errors coming with FD_CONNECT message, look for FD_CLOSE
message, and inform relay when connection is lost so its reconnect
logic is triggered.  This seems at least to handle the case where I
kill the relay mid-game.
2009-09-20 19:00:54 +00:00
ehouse
4ce9a87be5 Use new relay status callback, and similar callback added to socket
read/writer, to provide connection status beside scoreboard (in area
outside that managed by code in common/).  Simple letters now, it'll
be icons eventually.
2009-09-15 13:04:34 +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
448ea05443 Start adding logging to sockets code... 2009-09-07 18:23:49 +00:00
ehouse
f9e6c5631d Move WSACleanup into main where it can be called once per launch
rather than per use of relay, parallel to WSAStartup.
2009-03-08 20:01:47 +00:00
ehouse
2be682b4e9 Use new bufqueue util 2009-02-09 02:51:43 +00:00
ehouse
9ce82a7c94 fix leak of packet buffers; get rid of multithread code. 2009-02-07 18:20:16 +00:00
ehouse
5a5cba9d1b Handle case where packet contains several messages; attempt to send on
socket-writable and on receiving message to be sent; cleanup.  With
this change full robot-vs-robot game has worked over relay, but not
reliably.  I think it's the relay's fault.  Still tested only on Win32.
2009-02-01 16:46:00 +00:00
ehouse
1a99dc7e1c Beginning of rewrite of socket code for communication with relay,
replacing dedicated threads for read and write with non-blocking
sockets driven from the main window proc.  So far it can do a
round-trip against the relay on win32, and compiles but isn't tested
on wince.
2009-01-31 18:06:09 +00:00
ehouse
ac8c06d9cf Turn on and enable UI for relay and sms transport. relay doensn't
work, at least on win32 where threading code is broken, and former is
completely stubbed out.
2009-01-05 14:13:40 +00:00
ehouse
4698b835e8 Fix to compile with relay enabled and not STANDALONE_ONLY. Verified
that win32 build can open games saved by previous version, but nothing
else (e.g. use of network or even dialogs to set up relay connection
parameters.)
2009-01-04 00:00:45 +00:00
ehouse
f1def437c3 Use new XP_TriEnable type; begin work to support bluetooth by tracking
connType and adding choice how to connect.  Bt connect dialog is
invoked, but the fields won't be populated.  Pass conn type into
socket constructor, assuming socket code doesn't change much to use BT
rather than TCP.
2006-10-28 14:56:04 +00:00
ehouse
a292e33c03 catch up with recent API changes; fix bug in newgame dialog. 2006-09-15 07:39:57 +00:00
ehouse
9166d66589 use MS macro to get winsock functions instead of eponymous posix ones.
With this change, play over IP works again!
2006-03-21 03:47:15 +00:00
ehouse
b9aa155761 cast threadstart func ptrs. Not sure why... 2006-02-17 07:31:21 +00:00
ehouse
3f577181dd use debhacks 2006-01-28 19:03:10 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
b9de2acebf change how struct is defined for gcc 2005-11-27 20:06:36 +00:00
ehouse
13d9e7e8c8 timeout isn't an assertion failure 2005-08-21 14:07:12 +00:00
ehouse
294ce5f513 Add and use driver for communication over TCP. Driver uses two
threads, reader and writer, on a single socket.  With this checkin a
connect request reaches the relay and a response comes back and is
passed to and recognized by the common code.  A full game should now
work, but hasn't been tried.  Nor is there any handling of socket
errors, retries, etc.
2005-07-30 02:02:49 +00:00