Jon, That error is from another error. Your code has :
inetAddrP = (NetSocketAddrINType *) &AppNetSockAddr; inetAddrP->family = netSocketAddrINET; inetAddrP->port = 3000; inetAddrP->addr = 0x0a000018; You need to have the the appropriate conversion Host-To-Net, something like : NetIPAddr ipaddr; inetAddrP->port = NetHToNS( 3000); ipaddr = NetLibAddrAToIN( AppNetRefNum, "10.0.0.24" ); inetaddr->addr = NetHToNL( ipaddr ); The very important thing on socket programming is converting Host to Net on the way out, and Net to Host on the way in. Vu ----- Original Message ----- From: "Jonathan Niedfeldt" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, February 19, 2004 10:29 PM Subject: Re: NetLibReceive() blocks > Hi Vu, > > If I set it to "true" my NetLibSocketConnect() call returns an error of > "netErrWouldBlock" and fails... > > Jon > > "Vu Pham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > > ----- Original Message ----- > > From: "Jonathan Niedfeldt" <[EMAIL PROTECTED]> > > Newsgroups: palm-dev-forum > > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > > Sent: Thursday, February 19, 2004 10:03 PM > > Subject: NetLibReceive() blocks > > > > > > > ========= Code snippet =============== > > > static BOOL SetupNetwork() > > > { > > > BOOL bRet = true; > > > Err error; > > > UInt16 ifErrs; > > > NetSocketAddrINType *inetAddrP; > > > BOOL blockFlag = false; > > > > > > > [...] > > > > > // Set the socket to not block on read > > > > > > if( NetLibSocketOptionSet( AppNetRefNum, > > > AppNetSocketRef, > > > netSocketOptLevelSocket, > > > netSocketOptSockNonBlocking, > > > &blockFlag, > > > sizeof(blockFlag), > > > AppNetTimeout, > > > &ifErrs) ) > > > { > > > MessageBox( "Could not set non-blocking on socket" ); > > > FrmGotoForm(MainForm); > > > return(false); > > > } > > > > > > > I think you should set blockFlag to true. This is the flag for > NonBlocking. > > True means nonblocking. > > > > HTH, > > > > Vu > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
