Ben,
does this look right to you?
addr = NetLibAddrAToIN(libRefNum, "72.9.248.66");
MemSet(&destAddr, sizeof(destAddr), 0);
destAddr.family = netSocketAddrINET;
destAddr.port = 80;
destAddr.addr = addr;
MainSocket = NetLibSocketOpen(libRefNum, netSocketAddrINET,
netSocketTypeStream, 0, -1, &error);
NetLibSocketConnect(libRefNum, MainSocket, (NetSocketAddrType*)&destAddr,
sizeof(destAddr), -1, &error);
--
Scott Erickson
Software Development Team, FB-4, Inc.
[EMAIL PROTECTED]
"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 03:33 PM 4/20/2005, you wrote:
>>Hi,
>> I wanted to know which format i needed to send to this function.
>>255.255.255.255, or 255.255.255.255:80. I need to give it a web server
>>address, and i see no other place in the NetLib functions to apply the
>>port
>>number. I am not sure which format is right because it will complie with
>>both formats, and returns a different value for each one.
>
> The port number isn't part of the address. The port number is stored in
> your NetSocketAddrINType, which also stores the NetIPAddr that you get
> back from NetLibAddrAToIN(). This structure is passed to
> NetLibSocketOpen.
>
>
> -- Ben Combee, Senior Software Engineer, palmOne, Inc.
> "Combee on Palm OS" weblog: http://palmos.combee.net/
> Developer Forum Archives: http://news.palmos.com/read/all_forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/