YAP 7.1.0
YAP Old Style Socket and Pipe Interface

Autoload the socket/pipe library. More...

Detailed Description

Autoload the socket/pipe library.

Class Documentation

◆ socket/2

class socket/2

socket(+ DOMAIN,- SOCKET)

Call socket/4 with TYPE bound to ‘SOCK_STREAM’and _PROTOCOL_ bound to0`

◆ socket/4

class socket/4


Corresponds to the BSD system call socket Create a socket for domain DOMAIN of type TYPE and protocol PROTOCOL Both DOMAIN and TYPE should be atoms, whereas PROTOCOL must be an integer The new socket object is accessible through a descriptor bound to the variable SOCKET

The current implementation of YAP accepts socket domains AF_INET and AF_UNIX Socket types depend on the underlying operating system, but at least the following types are supported: SOCK_STREAM and SOCK_DGRAM (untested in 6.3)

◆ socket_connect/3

class socket_connect/3

socket_connect(+ SOCKET, + PORT, - STREAM)

Interface to system call connect, used for web clients: connect socket SOCKET to PORT The connection results in the read/write stream STREAM

Port information depends on the domain:

  • 'AF_UNIX'(+ FILENAME) connect to socket at file FILENAME
  • 'AF_INET'(+ HOST,+ PORT) Connect to socket at host HOST and port PORT

◆ open_pipe_streams/2

class open_pipe_streams/2

open_pipe_streams(Read, Write)

Autoload old pipe access interface