GS wrote:
> Is there any on-line text books available?. I did serach, but didn't
> find any good ones?. Thanks.
>
Nope.
There are a number of really good books, and they are not cheap, but all
the POSIX sockets stuff is freely available - just download the source
code
If you are cool with this following bit of code, then you shouldn't have
a problem:
serveradd.sin_family = AF_INET;
serveradd.sin_port = htons(portnum);
memcpy(&serveradd.sin_addr,
host->h_addr_list[0],
sizeof(serveradd.sin_addr));
err = connect(mysock, (sockaddr *)
&serveradd, sizeof(serveradd));
On the other hand, if you look at this bit of code and think `WTF?',
don't even think about it!
Steve