> I try tu use the barkley API unix calls for the TCP connection call when I
tried
> to call "connect" (even if I substitute it with NetLibSocketConnect) I
have
> Timeout Error, even if my AppNetTimeout is at 6000( i.e. systicks *60). I
> recieve this error when not yet a second is passed, how can I solve it?
> Is there anybody who as already made a TCP connection and  used the
sendmsg
> function?

Use the following order of calls:

1.Open socket
2. allocate  NetHostInfoBufType Buf;
3. MemSet(&Buf, sizeof(Buf), 0);
4. NetSocketAddrINType Addr=AddrPrepare(Buf, 0);
5. Bind(Addr);
6. GetHost(strAddr, Buf);
7. Addr=AddrPrepare(Buf, nPort);

8. Connect(Addr);

where AddrPrepare is converter from (NetHostInfoBufType, port) to
NetSocketAddrINType



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to