[ 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.

Examples

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

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.