|
nbsp; hostent FAR *host_ptr; /* Ptr to the host name */
struct sockaddr_in dest; /* Addr of target host */
SOCKET hSock; /* The socket to create
*/
int iSockType;
extern int iTCP;
extern int iUDP;
/* Internet family addressing */
dest.sin_family = PF_INET;
if (iproto == iTCP) {
iSockType
= SOCK_STREAM;
}
else if (iproto == iUDP) {
iSockType
= SOCK_DGRAM;
}
else {
&nb |