[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_SockConnect

Overview

Create a socket to a remote host and port

Syntax

    SOCKET Ns_SockConnect (
    	char		*host,
    	int		port
    );

Description

Ns_SockConnect creates a socket connected to a remote host and port. Ns_SockConnect waits for the connection to be established before returning.

Example

    sock = Ns_SockConnect("mailhost", 25);
    if (sock != INVALID_SOCKET) {
     ... talk SMTP over sock ...
    }

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.