Commit graph

1244 commits

Author SHA1 Message Date
ehouse
978d840df7 put back functions that never should have been removed. 2005-06-27 05:45:28 +00:00
ehouse
78aefbefea fix description at user's suggestion 2005-06-27 05:23:14 +00:00
ehouse
c2fe26ec77 up version to b4 to match next tag 2005-06-27 04:01:51 +00:00
ehouse
6728862399 cast to stop warning on wince 2005-06-27 03:56:09 +00:00
ehouse
2871778cb7 remove logging 2005-06-25 05:44:30 +00:00
ehouse
e92234b324 cleanup: make module-local functions static 2005-06-25 05:43:56 +00:00
ehouse
8faf6a670c add default compile command 2005-06-25 05:43:04 +00:00
ehouse
f6a6827c59 fix compile warnings 2005-06-23 14:12:09 +00:00
ehouse
2fbfeee378 util_setTimer changes 2005-06-23 14:09:20 +00:00
ehouse
3054637842 heartbeats: send to clients in connection response; note when
heartbeat and other messages arrive; and periodically reap sockets
that haven't been active in long enough.
2005-06-23 04:26:44 +00:00
ehouse
e6b5d2d0e4 version to 4.2x 2005-06-23 04:23:06 +00:00
ehouse
fa945f74aa handle heartbeat timer and change to util_setTimer 2005-06-23 04:22:46 +00:00
ehouse
684697216d fix timer not getting drawn on highres screens; handle heartbeat timer
and change to util_setTimer
2005-06-23 04:22:27 +00:00
ehouse
3ab25c843b fix timer not getting drawn on highres screens 2005-06-23 04:21:35 +00:00
ehouse
5385c9f7dc BEYOND_IR now the default 2005-06-23 04:20:46 +00:00
ehouse
767de5a284 implement new util_setTimer, and handle heartbeat timer 2005-06-23 04:20:00 +00:00
ehouse
dfccb19667 convert util_setTimer to take procptr; remove timer call on board; add
heartbeat to comms that uses util_setTimer with new timer type.
2005-06-23 04:16:53 +00:00
ehouse
5e02ca1c86 first checked in. Seems to work. 2005-06-22 06:40:53 +00:00
ehouse
e2cbee1210 path to local copy of wordlist 2005-06-16 05:12:49 +00:00
ehouse
c57206f483 catch franklin up with recent API changes 2005-06-16 05:12:28 +00:00
ehouse
9d5ea796f3 don't draw board before it's set up 2005-06-13 14:51:21 +00:00
ehouse
001058da03 add a couple of consts to fix warnings 2005-06-13 14:34:01 +00:00
ehouse
9a09a24aab fix DEBUG compile error 2005-06-13 14:33:05 +00:00
ehouse
8eb0b50cec fix scrolling; resize board, enabling scrolling, when SIP is revealed.
And make it possible for user to reveal it.
2005-06-13 14:29:49 +00:00
ehouse
7c906a70ba add debug-version logging to catch dictionary corruption 2005-06-13 13:36:26 +00:00
ehouse
6c9caadd43 use clipping when drawing bitmaps, can center 'em. This fixes
overwriting borders when cells shrink when SIP is visible.
2005-06-13 13:32:06 +00:00
ehouse
5803496007 turn on scrolling by default 2005-06-13 13:24:15 +00:00
ehouse
b0e6ac2b7c add relay dir to -I list 2005-06-13 13:23:33 +00:00
ehouse
835f81582d fix typos 2005-06-11 15:32:34 +00:00
ehouse
69277eee0b first checkin for Danish 2005-06-11 15:32:09 +00:00
ehouse
c2297590eb fix incorrect signature that was causing all scores to be drawn as 0. 2005-06-09 14:18:55 +00:00
ehouse
cfa1a42fcd fix formatting; make board wide enough for timer. 2005-05-30 00:20:42 +00:00
ehouse
40634e33c6 add justification to draw_string_at to better position using pango. 2005-05-30 00:03:58 +00:00
ehouse
8c201ff01b give tiles a background color 2005-05-29 21:17:23 +00:00
ehouse
a83f1b46b6 Switch to GTK 2.n. 2005-05-29 20:40:38 +00:00
ehouse
3c23117a2a New fields in drawCtxt for pango-based text layout; other tweaks for
switch to GTK 2.n.
2005-05-29 20:39:01 +00:00
ehouse
7986e14d08 huge set of changes to get working with GTK 2.n. Type changes and
casts, rewrite of img-button creation, tweaks in startup ordering that
may not have been necessary.
2005-05-29 20:37:35 +00:00
ehouse
521de82234 huge set of changes to get working with GTK 2.n. Use pango for text
drawing, getting rid of all GdkFonts; get rid of clipping until I
understand why it was prevent all drawing.  Etc.
2005-05-29 20:32:48 +00:00
ehouse
2a39b6950f switch to g_signal_connect 2005-05-29 20:17:09 +00:00
ehouse
ae8a861098 formatting fixes; casts for GTK 2005-05-29 19:37:42 +00:00
ehouse
06e28770d1 make one formal param const 2005-05-29 19:31:09 +00:00
ehouse
4095acc327 casts to stop compiler warnings 2005-05-29 19:29:33 +00:00
ehouse
37dd97edf6 add NetLibGetHostByName 2005-05-01 18:23:28 +00:00
ehouse
af10fa0425 modify TARGET .prc name based on ARCH 2005-05-01 17:39:09 +00:00
ehouse
9c5971d36c implement usage() 2005-05-01 17:38:31 +00:00
ehouse
f702a75188 log incoming ip addr 2005-05-01 17:38:11 +00:00
ehouse
aef5cc3fc9 NetLibGetHostByName 2005-05-01 17:36:33 +00:00
ehouse
c56d76d743 add types for netlib funcs 2005-05-01 17:34:39 +00:00
ehouse
b1b9e96142 enable network-aware PNO build 2005-05-01 17:19:50 +00:00
ehouse
3d0530d30d fix crash by initing in right place. (modified and checked in from 9300) 2005-04-22 13:49:33 +00:00
ehouse
343e97a9ea catch up with interface change 2005-04-21 03:43:03 +00:00
ehouse
576e2ec447 finally check in bitmap drawing; tweak font selection to look better
on device.
2005-04-21 01:09:46 +00:00
ehouse
9fa68e4936 lots of little changes; cleanup and support ctrl functions 2005-04-20 12:13:20 +00:00
ehouse
df17fe4f1e reorganize; support ctrl functions 2005-04-20 12:10:05 +00:00
ehouse
d885af5386 count bytes sent 2005-04-20 12:08:33 +00:00
ehouse
92c2017cae use rwlock instead of mutex 2005-04-20 12:06:25 +00:00
ehouse
7036e53229 move to using rwlock 2005-04-20 12:03:58 +00:00
ehouse
12fc28315c more debug info 2005-04-20 11:59:08 +00:00
ehouse
40351e187b add several new commands 2005-04-20 11:57:26 +00:00
ehouse
54843e68bf fix warnings 2005-04-08 14:28:04 +00:00
ehouse
fdca4b0a88 add rwlock helper classes 2005-04-08 14:18:14 +00:00
ehouse
a809a057e4 mutex replaced by rwlock 2005-04-08 14:17:28 +00:00
ehouse
a50fe1d1be replace mutex with rwlock; move creation inside class so can be
controlled by same rwlock.
2005-04-08 14:15:23 +00:00
ehouse
7a15f44c12 move creation inside class so can be controlled by same rwlock 2005-04-08 14:13:25 +00:00
ehouse
423ff190ea turn on warnings 2005-04-08 14:11:00 +00:00
ehouse
9ee54bf8a3 don't assert after poll returns! Instead close socket on hangup. 2005-04-03 17:02:09 +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
0629dc5223 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.
2005-04-03 16:58:36 +00:00
ehouse
de4af7c8ce add util_util_addrChange 2005-04-03 16:57:01 +00:00
ehouse
961ca6e256 add linux_util_addrChange (stubbed out) 2005-04-03 16:56:39 +00:00
ehouse
62b994e32e track whether running on POSE to work around NetLibSelect bug; track
whether addr needs re-resolving.
2005-04-03 16:55:38 +00:00
ehouse
b485deb357 add palm_util_addrChange; track whether running on POSE to work around
NetLibSelect bug.
2005-04-03 16:54:54 +00:00
ehouse
84cdcc8d30 remove unneeded param 2005-04-03 16:53:32 +00:00
ehouse
f5320a46bd deal with address change, esp of hostname, and separate name
resolution from socket opening.
2005-04-03 16:52:51 +00:00
ehouse
45621dffdb turn off linger on new sockets; use long enough timeout on name
resolution that can succeed on device.
2005-04-03 06:24:55 +00:00
ehouse
c5674701b9 catch up with api changes 2005-04-03 04:13:09 +00:00
ehouse
ad6de22306 add comms_getInitialAddr; protect against recursive sends 2005-04-03 02:49:04 +00:00
ehouse
3d27d0d882 add comms_getInitialAddr 2005-04-03 02:48:50 +00:00
ehouse
abc866af74 needn't open netlib from here! 2005-04-03 02:47:46 +00:00
ehouse
bf331a2805 fix for api change 2005-04-03 02:47:08 +00:00
ehouse
930b320011 first checked in. Works, but error recovery not done yet. 2005-04-03 02:46:31 +00:00
ehouse
3add8ccbf4 move generic send/receive stuff from palmir.c; tweak data structures
for relay scheme.
2005-04-03 02:00:44 +00:00
ehouse
8af072f8d9 move generic send/receive stuff from palmir.c. 2005-04-03 01:59:57 +00:00
ehouse
656bcac3aa modify ip-params dialog for new relay-based scheme, using new struct
fields and dialog objects.
2005-04-03 01:58:02 +00:00
ehouse
b6d3ad8a07 add XP_LD 2005-04-03 01:53:07 +00:00
ehouse
0839ce0337 remove ip-related stuff to new files 2005-04-03 01:47:34 +00:00
ehouse
b56b4f7b37 add palmip.c; change how upload works 2005-04-03 01:39:08 +00:00
ehouse
39185fef17 create new comms object if needed for non-first game 2005-04-03 01:36:59 +00:00
ehouse
e3151bdfe2 add command parsing and dispatch table 2005-03-31 02:20:50 +00:00
ehouse
a024c7ccd5 first checked in. works but not robust 2005-03-31 02:11:51 +00:00
ehouse
3f64d755b6 break up compile; new file 2005-03-30 02:00:15 +00:00
ehouse
db3ce42a4f this file owns thread creation now 2005-03-30 01:52:10 +00:00
ehouse
9dcec7d66c new include 2005-03-30 01:49:40 +00:00
ehouse
99d713bd8a first checked in 2005-03-30 01:47:55 +00:00
ehouse
855bc67b17 use new thread pool class 2005-03-30 01:42:28 +00:00
ehouse
64c7513867 cleanup 2005-03-30 01:32:02 +00:00
ehouse
3e476b3771 use system APIs to find stuff in app directory rather than hard coding
path.  Use system apis to find uniquie file names for games.
2005-03-26 03:25:44 +00:00
ehouse
663b3cc1a7 use c: drive, not z:, for uniformity with native version 2005-03-26 03:16:55 +00:00
ehouse
b64103ad7e don't use null comms 2005-03-25 13:41:18 +00:00
ehouse
3d40cc0e5c add cmd to lock/unlock main mutex 2005-03-25 03:24:00 +00:00
ehouse
97323636a9 use new stack-based lock 2005-03-25 03:21:16 +00:00
ehouse
a85716e8d5 first checked in. works 2005-03-25 03:19:03 +00:00
ehouse
b3432d4dfa check for null comms before using 2005-03-25 03:13:10 +00:00
ehouse
c9f60e758c don't instantiate comms unless it'll be used. Internally it has no
idea it's not supposed to connect to relay otherwise.
2005-03-25 03:11:54 +00:00
ehouse
3fd6998c2a add mutexes; general improvements 2005-03-25 02:59:44 +00:00
ehouse
120a3c1773 first checked in 2005-03-25 02:59:10 +00:00
ehouse
02c71850ee let socket server know how many connections to expect 2005-03-23 05:48:11 +00:00
ehouse
cf271c4411 fix shutdown panic by disposing fonts 2005-03-23 05:47:19 +00:00
ehouse
8b34f57bf9 don't kill socket when client connects before server 2005-03-21 05:30:55 +00:00
ehouse
dcebf5bc78 remove null-dereference when socket closed by two threads 2005-03-21 05:30:12 +00:00
ehouse
24690a2a10 too much logging 2005-03-21 05:29:37 +00:00
ehouse
f069c4c2dc "dead" is not a option for players 2005-03-21 05:29:08 +00:00
ehouse
d82f467479 load and save remote/local field 2005-03-21 05:28:27 +00:00
ehouse
f78ebee08b display remote players names in [] on scoreboard 2005-03-20 21:06:23 +00:00
ehouse
5eba6f5511 keep queue of incoming packets since new ones arrive before old can be
processed.  With this fix a complete robot-vs-robot game works between
9300 and gtk version over relay.
2005-03-20 21:05:41 +00:00
ehouse
1f3d94998f define XP_LD 2005-03-20 21:03:18 +00:00
ehouse
a02feee3b9 fix stream creation to include channelNo; correctly return success
from sym_send; fix to build in standalone case.
2005-03-20 19:55:49 +00:00
ehouse
d0441ee1e3 fix runl to reset after error so we'll try again, e.g. after first
using a hostname that doesn't resolve.
2005-03-20 19:52:21 +00:00
ehouse
105e5ed8ca move unused var 2005-03-20 19:49:08 +00:00
ehouse
848552dfe4 wins binary dir name changed 2005-03-20 19:48:14 +00:00
ehouse
dd3222ddbd resend messages menu item 2005-03-20 19:47:47 +00:00
ehouse
8181d03aac MakeSimpleStream needs channelno param 2005-03-20 19:47:07 +00:00
ehouse
10ae6d1f1e add XP_LD to correctly log 32-bit vals 2005-03-20 19:46:20 +00:00
ehouse
df68184819 add ResetState 2005-03-20 19:45:43 +00:00
ehouse
94b03dcd5d add relay/ dir; tweak for debugging inside M$VS 2005-03-20 19:45:19 +00:00
ehouse
7559c87e1a add some wins temp files 2005-03-20 19:44:07 +00:00
ehouse
290cb0b9da fix to build in standalone case 2005-03-20 19:43:00 +00:00
ehouse
edceee12a8 add XP_LD so symbian can long 32-bit vals 2005-03-20 19:41:30 +00:00
ehouse
078ab48fa1 fix bad assert 2005-03-20 15:01:59 +00:00
ehouse
e6abaaea98 add cookie field 2005-03-19 22:30:39 +00:00
ehouse
6212e4379b Connect using address passed in. Other cleanup around relay use, name
changes, etc.
2005-03-19 22:28:55 +00:00
ehouse
9b66f40d78 tweak CIdle timer use to handle incoming packets so these don't have
to be handled from within socket handler's RunL.  Other cleanup around
relay use, name changes, etc.
2005-03-19 22:27:59 +00:00
ehouse
7503282e27 tweak CIdle timer use to handle incoming packets so these don't have
to be handled from within socket handler's RunL.
2005-03-19 22:21:55 +00:00
ehouse
a8ab94d182 add cookie field 2005-03-19 22:20:16 +00:00
ehouse
e57f5e1ab2 param name fix 2005-03-19 22:19:32 +00:00
ehouse
261b03c5a5 -I relay/ 2005-03-19 22:17:23 +00:00
ehouse
dc25eb9e35 first checked in. 2005-03-19 22:16:49 +00:00
ehouse
73104819bd first checked in. primative, but works. 2005-03-19 22:14:27 +00:00
ehouse
50d8c1067b total rewrite. New protocol eliminates need to store and forward
messages: clients connect, then messages are passthru only.  Add
control port.  Use stl map and vector to remove limit on number of
connections.  Also removed synchronization, which need to be re-added.
2005-03-19 22:13:43 +00:00
ehouse
ab6d11a32a add two new .cpp files 2005-03-19 22:09:03 +00:00
ehouse
7d622f9484 fix and cleanup linux client to move to using tcp. Add the ability to
deal with socket dying and (maybe) being replaced.  Only connect on
demand now, when first packet's ready to go.
2005-03-19 22:07:53 +00:00
ehouse
02bc9178db add XP_STRNCPY 2005-03-19 22:06:23 +00:00
ehouse
d6efb446d1 Wrapping protocol around standard comms stuff that talks to the relay.
Revert previous relay-related changes.
2005-03-19 22:01:38 +00:00
ehouse
19b0d88a69 remove gross connectRelay hack. There's now a wrapping protocol that
talks to the relay entirely inside comms.c.
2005-03-19 21:48:47 +00:00
ehouse
8eb4abac6f added '-I relay/' 2005-03-19 21:47:18 +00:00
ehouse
fc6095255d listen port goes away; add separate union member for relay addressing 2005-03-19 21:46:51 +00:00
ehouse
022fd1cb9d util_listenPortChange gone 2005-03-19 21:45:21 +00:00
ehouse
272e66e635 nuke logging that was polluting ncurses screen 2005-03-19 21:44:35 +00:00
ehouse
af8602f63b add stringFromStreamHere() 2005-03-19 21:44:09 +00:00
ehouse
70b45e11c5 catch up with API change 2005-03-15 15:29:17 +00:00
ehouse
dd8f2f92c5 fix problems with clients in networked games making a move after the
game should end: check number of passes and that all players still
have tiles before running robot.
2005-03-15 15:18:58 +00:00
ehouse
2e0ee693bc add assert 2005-03-15 15:13:52 +00:00
ehouse
38bd3d4528 correct spelling 2005-03-15 06:27:21 +00:00
ehouse
5e547eb8b0 move playerNum into dsi so can be used in formatting score 2005-03-15 06:26:58 +00:00
ehouse
13b55cfeab use compiler flags that ease debugging 2005-03-15 06:22:48 +00:00
ehouse
26cd5c2d88 add model_recentPassCountOk 2005-03-15 03:31:52 +00:00
ehouse
912f53178b move playerNum into dsi so can be used in formatting score; show
most recent turn (like symbian 80)
2005-03-15 03:29:37 +00:00
ehouse
36bba4024b move playerNum into dsi so can be used in formatting score 2005-03-15 03:27:24 +00:00
ehouse
af1416ed99 api change 2005-03-12 05:33:40 +00:00
ehouse
1c7e530538 deal with tcp streams the same in curses as on gtk. Both work now
with the relay.
2005-03-12 05:33:30 +00:00
ehouse
229d615e84 comment out overly-verbose logging 2005-03-09 15:19:40 +00:00
ehouse
219b6ce937 save hostIDs as part of comms; add logging 2005-03-09 15:18:17 +00:00
ehouse
f5c43f3dfc add util_addrChange 2005-03-09 15:14:10 +00:00
ehouse
ef828a0bdf fix misspelling 2005-03-09 15:12:57 +00:00
ehouse
75ae636807 remove unused file 2005-03-09 15:09:24 +00:00
ehouse
d22f34c713 add sym_util_addrChange 2005-03-09 15:06:14 +00:00
ehouse
4ca237cb32 fold reading into send socket. Now receives packets from relay,
though things break down after a few moves.
2005-03-09 15:04:28 +00:00
ehouse
26f532bcf1 fold reading into send socket 2005-03-09 14:51:11 +00:00
ehouse
68d6d04459 merge from palm 1.4 branch changes to allow arm-only, etc builds from
commandline.
2005-03-08 05:36:33 +00:00
ehouse
0f9eb528d8 fix conflict with type from Palm headers; fix for non-BEYOND_IR case. 2005-03-08 05:33:38 +00:00
ehouse
9b9f71322f first checked in 2005-03-06 18:30:59 +00:00
ehouse
39225c8622 first checkin. Works about half the time for one or two games at a
time.  Very fragile.
2005-03-06 18:27:16 +00:00
ehouse
897caf4e88 Replace UDP-based messaging with TCP. Stream protocol says distinct
message is length plus data.  Use non-deprecated gtk select-like
function.  With these changes can play full games through the relay on
gtk.  Untested on ncurses but probably broken.
2005-03-06 18:07:00 +00:00
ehouse
cb3a3854e9 add support for relay for use by NAT'd/firewalled devices: cellphones.
Include cookie users will agree on on for relay rendevouz, and
sender/receiver IDs for when there are >2 devices in game.  Supports
games between linux clients now, but needs a lot more work.
2005-03-06 17:56:34 +00:00
ehouse
71870695cc HACK: server must ping relay or it can't be contacted 2005-03-06 17:51:18 +00:00
ehouse
2e9dd5f3ea cleanup; add debugging info for state changes 2005-03-06 17:49:37 +00:00
ehouse
840f8c273a add symrsock; begin separating DEBUG and non- targets 2005-03-03 15:31:11 +00:00
ehouse
1a420d3f5f open socket for incomming, and provide callback to get incomming data
to comms.  Doesn't work yet, likely because of firewall issues, so
simple UDP may not be the answer.
2005-03-03 15:29:59 +00:00
ehouse
1879a23c34 first checked in. Untested since I can't get packets to the device
from outside the carrier's firewall.
2005-03-03 15:28:24 +00:00
ehouse
58eba68c1b cleanup 2005-03-03 15:26:19 +00:00
ehouse
8ffb617a17 open socket for incomming, and provide callback to get incomming data
to comms.  Doesn't work yet, likely because of firewall issues, so
simple UDP may not be the answer.
2005-03-03 15:24:53 +00:00
ehouse
c8b87e64f7 add sym_util_listenPortChange 2005-03-03 02:17:46 +00:00
ehouse
ca8237fe89 turn on BEYOND_IR 2005-03-02 15:01:47 +00:00
ehouse
3b899427d5 remove define that should be passed in as -D 2005-03-01 13:55:58 +00:00
ehouse
0e347790ba add socket-related libs 2005-03-01 13:54:50 +00:00
ehouse
1555e99a74 SetActive call required 2005-03-01 13:53:41 +00:00
ehouse
0e3e09eba9 initial null addr rec is normal; deal with it 2005-03-01 01:14:34 +00:00
ehouse
484fb9a631 add a bunch of methods toward actually sending something. 2005-03-01 01:13:05 +00:00
ehouse
0e9b5d6ee6 add a bunch of logging, temporarily, since this is often where
resource problems show themselves
2005-03-01 01:11:58 +00:00
ehouse
db8d98835f add a bunch of ivars and methods toward actually sending something. 2005-03-01 01:10:30 +00:00
ehouse
eae9c1ebb9 cleanup 2005-03-01 01:08:06 +00:00
ehouse
db2becd29e add clean_state target 2005-02-27 20:09:05 +00:00
ehouse
03527d0f97 wrong format string descriptor 2005-02-27 20:08:31 +00:00
ehouse
61961f3bcf passing wrong name to open 2005-02-27 20:07:05 +00:00
ehouse
7bb8787a63 use upload var if present; clean up STANDALONE_ONLY var 2005-02-26 03:00:37 +00:00
ehouse
f64ed67cc8 create and use sending socket 2005-02-26 02:59:23 +00:00
ehouse
43b42dccf1 add socket ivar 2005-02-26 02:58:10 +00:00
ehouse
f02926e59d skeleton only. 2005-02-26 02:57:19 +00:00
ehouse
95ae231a79 log name of dict unable to open 2005-02-25 04:18:50 +00:00
ehouse
c54d30202c cleanup 2005-02-25 03:38:02 +00:00