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

Ns_SockListen

Overview

Create a socket on a specified address and port

Syntax

    SOCKET Ns_SockListen (
    char *host,
    int port
    );

Description

Ns_SockListen creates a socket listening for connections on the specified address and port.

Examples

    sock = Ns_SockListen("localhost", 25);
    while (1) {
       new = accept(sock, NULL, 0);
       ... communicate with client on new ...
    }

Top of Page

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