After going through my email I realized that Keith was right.
So here is what we have already done.
We have the server running on one machine,for this we open a socket,bind
it to a port and then listen on that port.
For starters we decided to run only the server on one machine and the
client on the other.
The server does "listen",but the client seems to be not sending anything..
The client gives a 4626 which is a time out error,we have defined timeout
as -1,which is for ever.
The log files give the Serial Link Manager errors
CmdWriteRemoteMem: error in SlkSendPacket = Error code: 00AA
CmdWriteRemoteMem: error in SlkReceivePacket = Error code: 030B
in both the client and the server.

This is the crux of our Server code
MasterSocket = NetLibSocketOpen (AppNetRefnum,PF_INET,SOCK_STREAM,
IPPROTO_TCP,-1,&errno);

AddrLength = sizeof(Addr);
bzero ((char *) &Addr, AddrLength);
Addr.family = AF_INET;
Addr.port = htons (1234);
Addr.addr=NetLibAddrAToIN(AppNetRefnum,a);

NetLibSocketBind (AppNetRefnum, MasterSocket, (NetSocketAddrType
*)&Addr,sizeof(struct sockaddr_in), AppNetTimeout, &errno);

RetVal=NetLibSocketListen (AppNetRefnum, MasterSocket,1,AppNetTimeout,
&errno);

And this is what the client does..

ClientSocket = NetLibSocketOpen
(AppNetRefnum,AF_INET,SOCK_STREAM,0,-1,&errno);


ServerAddrLength = sizeof(ServerAddr);
bzero ((char *) &ServerAddr, ServerAddrLength);
ServerAddr.family = AF_INET;
ServerAddr.port = htons (2345);
ServerAddr.addr=NetLibAddrAToIN(AppNetRefnum,b);


AddrLength = sizeof(Addr);
bzero ((char *) &Addr, AddrLength);
Addr.family = AF_INET;
Addr.port = htons (1234);
Addr.addr=NetLibAddrAToIN(AppNetRefnum,a);

ClientConnected=NetLibSocketConnect(AppNetRefnum,ClientSocket,(NetSocketAddrType
*)&ServerAddr,/*ServerAddrLength*/sizeof(struct sockaddr_in), -1,&errP);

RetVal = NetLibSend (AppNetRefnum, NewSocket,&buffer,
bufferLen,0,0,0,AppNetTimeout , &errno);

I hope this helps you help us!!


Dharini Iyengar


On Wed, 3 Apr 2002, Keith Rollin wrote:

> At 2:50 PM -0800 4/3/02, Dharini Iyengar wrote:
> >Hi all this is my third email..
> >I havent got any response,pls help!!
>
> In my case, I haven't responded because there's not enough
> information.  It sounded like you hadn't explored what was going on,
> and that poking around a little bit might turn up the solution for
> you.
>
> >We are trying to develop an application where we would like 2 POSES
> >running on two different machines to talk. These machines are on a
> >network, and we have created sockets using Netlib. But seem to be
> >getting errors netErrTimeout and with the Serial Manager like
> >SlkReceivePacket. (The redirect netlib calls to tcp/ip is checked.)
> >Is there a likely explanation/solution for this? If not should we
> >start over??
>
> Having two Posers talk to each other should work.  But what you need
> to be clear about is:
>
> * Where is the error occurring?  You don't say if you can
> successfully create the sockets, open the sockets, bind the sockets,
> connect the sockets, or transmit data over the sockets.
>
> * What's this about SlkReceivePacket?  That's a Serial Link Manager
> function, not a Serial Manager function.  And neither of those have
> anything to do with NetLib.  So how does this fit in with what you're
> doing?
>
> Once again, I'd like to point out the following Web page, which
> should help anyone formulate better questions:
>
>       <http://www.tuxedo.org/~esr/faqs/smart-questions.html>
>
> -- Keith
>
> --
> 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/

Reply via email to