[ Reference Manual | Alphabetic Index ]

library(sockets)

Sicstus compatible sockets interface   [more]

Predicates

current_host(?HostName)
Get the host machine name
socket(+Domain, -Socket)
Create a socket
socket_accept(+Socket, -Stream)
Extract the first connection to socket
socket_bind(+Socket, +Address)
Bind a socket to an address
socket_connect(+Socket, +Address, -Stream)
Connect a socket to an address
socket_listen(+Socket, +Length)
Limit the maximum of pending connections
socket_select(+Socket, -NewStream, +TimeOut0, +Streams, -ReadStreams)
Wait for new connection on Socket, and for data on Streams
stream_select(+Streams, +TimeOut0, -ReadStreams)
Wait for data on Streams

Description

Note that ECLiPSe provides its own built-in socket manipulation predicates which provides similar functionality to this library.

This library is only provided for compatibility with the socket manipulation predicates of SICStus Prolog. To use these predicates, the sockets library has to be loaded:

    :- use_module(library(sockets)).
    
For SICStus 3.0, the sockets predicates are also in a sockets library, so no changes are needed to load the library. However, for older versions of SICStus, the predicates are available as built-ins, and no library has to be loaded. So if the code is written for older versions of SICStus, then the above line has to be added.

The sockets library can be used independently of the sicstus library.

About


Generated from sockets.eci on 2022-09-03 14:26