IP_ListenToService

IP_ListenToService -- like IP_ListenToPort, but uses the service name.

Syntax

int IP_ListenToService(char* service, int backlog);

Arguments

service

The service name, as found in /etc/services.

backlog

The number of connection requests that are allowed to be simultaneously pending.

Returns

The file descriptor (socket), or -1 and errno is set.

Description

This function wraps the listen library call, and registers the resulting file descriptor with the IP_Receive function. Prior to calling listen, this function looks up the service name to produce a port number which is given to IP_ListenToPort.

See Also

Working with TCP/IP, IP_ListenToPort, IP_ConnectToService

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.