Search the web
Sign In
New User? Sign Up
tekkotsu_dev · Tekkotsu Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Small Wireless Patch Part Deux   Message List  
Reply | Forward Message #1301 of 2001 |
When developing our networking protocol on the dogs, I couldn't figure
out why things were not connecting. I finally narrowed it down to the
simple problem of the TCP/IP stack timing out because the port at the
other end wasn't open or was not responding quickly enough. So, I
developed this helper function to let the programmer know when the
TCP/IP stack has failed in a bad state, i.e. timeouts, ports closed,
handshaking failed, etc... The isConnected function only allows you to
check whether or not you have successfully connected, but there is no
way of determining whether the connection failed at the TCP/IP level.
This simple function allows you to check and retry your connect if it
failed.
Chris

--
Chris Mansley
Research Assistant
VADER Lab
Lehigh University



Thu Mar 16, 2006 7:05 pm

chris.mansley
Online Now Online Now
Send Email Send Email

? error.patch
Index: Wireless.h
===================================================================
RCS file: /cvs/Tekkotsu/Wireless/Wireless.h,v
retrieving revision 1.23
diff -u -b -r1.23 Wireless.h
--- Wireless.h 31 Aug 2005 21:59:26 -0000 1.23
+++ Wireless.h 16 Mar 2006 18:57:12 -0000
@@ -89,6 +89,10 @@
bool isConnected(int sock) {
return sockets[sock]==NULL ? false :
sockets[sock]->state==CONNECTION_CONNECTED;
}
+ bool isError(int sock) {
+ return sockets[sock]==NULL ? false :
sockets[sock]->state==CONNECTION_ERROR;
+ }
+
bool isReady(int sock) { return !sockets[sock]->tx; }
bool hasData(int sock) { return !sockets[sock]->rx; }
//@}


Forward
Message #1301 of 2001 |
Expand Messages Author Sort by Date

When developing our networking protocol on the dogs, I couldn't figure out why things were not connecting. I finally narrowed it down to the simple problem of...
Chris Mansley
chris.mansley
Online Now Send Email
Mar 16, 2006
7:05 pm

Looks good -- I've checked them into cvs (thanks for making that straightforward ;) In general for everyone, even if you've already submitted something to me...
Ethan Tira-Thompson
ethan_tirath...
Offline Send Email
Mar 16, 2006
8:35 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help