I haven't looked at the calls myself but I have done socket stuff in C and windows so I'll give my thoughts about your questions Geetha. I think the NetLibSocketOpen() call is done on the Palm and is opening a local socket on the Palm for your application's use. The NetLibSocketConnect() actually connects your socket to the server's socket and thus you have communication. The netErrSocketClosedByRemote indicates to me that possibly the server is not accepting connections on the port you're attempting to connect on, there is a firewall blocking this port, or simply the server application is not running correctly (or at all!) to accept your connection. (Kind of like what Eduardo said)
/************************************************** Heath Schaefer Product Engineer Sporlan Division, Parker Hannifin Corporation 636.239.7711 x243 **************************************************/ Eduardo Orea <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/19/2008 11:04 AM Please respond to "Palm Developer Forum" <[email protected]> To "Palm Developer Forum" <[email protected]> cc Subject Re: netErrParamErr Geetha Arasu. Well, in my experience I had that kind of problem when the server side application crashed or ended soon with out notice, thus not give a chance to the client (palm) to get connection or send the data. I remember the error code by 1214 (4638 in decimal). Try searching in the server side, because this error only happend to me when the server had problems. Eduardo Orea. Geetha Arasu escribió: > Thanks.. > > Now shows the error 4628 which is netErrSocketClosedByRemote when i call > this function NetLibSocketConnect().. > NetLibSocketOpen() this function works fine.. err value is 0.. is there any > thing has to be done to open the socket.. why this error > (netErrSocketClosedByRemote) occurs ? > > Have any one encountered this problem before... any idea.. > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Eduardo Orea > Sent: Tuesday, February 19, 2008 11:47 AM > To: Palm Developer Forum > Subject: Re: netErrParamErr > > Geetha Arasu, I'm assuming that you successfully opened both the library > and the socket, it's hard to tell without code samples of what are you > doing. > > This is what I do when I use NetLibSocketConnect(), this code was inside > a function and it's fully functional. > > ----- CODE SAMPLE ----- > UInt16 AppNetRefnum // Got from library opening > NetSocketRef socket // Got from socket opening > Int32 AppNetTimeout = ( 6 * SysTicksPerSecond () ) // 6 sec timeout > > Int16 AddrLength; > NetSocketAddrINType Addr; > NetHostInfoBufPtr bufP; > NetHostInfoPtr infoP; > Err err; > > AddrLength = sizeof(Addr); > MemSet ((char *) &Addr, AddrLength, '\0'); > Addr.family = netSocketAddrINET; > Addr.port = NetHToNS (8080); > bufP = (NetHostInfoBufPtr) MemPtrNew (sizeof (NetHostInfoBufType)); > infoP = NetLibGetHostByName(AppNetRefnum, "127.0.0.1", bufP, > AppNetTimeout, &err); > Addr.addr = (NetIPAddr)NetHToNL((*(NetIPAddr *) infoP->addrListP[0])); > MemPtrFree (bufP); > > NetLibSocketConnect(AppNetRefnum, socket, (NetSocketAddrType*) &Addr, > sizeof(Addr), AppNetTimeout, &err); > if (err) > { > return err; > } > return errNone; > } > ----- CODE SAMPLE ----- > > Hope this help you out. > > Eduardo Orea > > > Geetha Arasu escribió: >> Hi .. >> >> I am writing a client network application using NetMgr.h. i am using >> treo 680 simulator. >> while using the Function NetLibsocketConnect , every time gives me an > error >> - netErrParamErr ... >> The error-The specified index is out of range or there is no configuration >> at the index. >> dont have an idea about it... >> could anyone suggest me what could be the reason for that >> error.. >> >> >> > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/ ----------------------------------------- "PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended recipient, please notify the sender by replying to this message and then delete the information from your system. Thank you for your cooperation." -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
