The unix-sockets Reference Manual

This is the unix-sockets Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:34:11 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 unix-sockets

UNIX Domain socket

Author

Arnold Noronha <>

License

Apache License, Version 2.0

Defsystem Dependency

uffi (system).

Dependencies
  • cffi (system).
  • trivial-gray-streams (system).
  • flexi-streams (system).
  • log4cl (system).
  • trivial-garbage (system).
Source

unix-sockets.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 unix-sockets/unix-sockets.asd

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).

ASDF Systems

unix-sockets.

Packages

unix-sockets-asdf.

Public Interface
Internals

3.1.2 unix-sockets/package.lisp

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).

Packages

unix-sockets.


3.1.3 unix-sockets/ffi.lisp

Dependency

unix_sockets.c (file).

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).

Internals

3.1.4 unix-sockets/streams.lisp

Dependency

ffi.lisp (file).

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).

Public Interface
Internals

3.1.5 unix-sockets/unix-sockets.lisp

Dependency

streams.lisp (file).

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).

Public Interface
Internals

3.2 C


3.2.1 unix-sockets/unix_sockets.c

Dependency

package.lisp (file).

Source

unix-sockets.asd.

Parent Component

unix-sockets (system).


4 Packages

Packages are listed by definition order.


4.1 unix-sockets-asdf

Source

unix-sockets.asd.

Use List
  • asdf/interface.
  • common-lisp.
Internals

4.2 unix-sockets

Source

package.lisp.

Use List
  • common-lisp.
  • trivial-gray-streams.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-unix-socket ((sck fn) &body body)
Package

unix-sockets.

Source

unix-sockets.lisp.


5.1.2 Ordinary functions

Function: accept-unix-socket (sock)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: close-unix-socket (sock)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: connect-unix-socket (path)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: make-unix-socket (path &key backlog)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: shutdown-unix-socket (sock)

Graceful shutdown the socket

Package

unix-sockets.

Source

unix-sockets.lisp.

Function: unix-socket-error (fmt &rest args)
Package

unix-sockets.

Source

unix-sockets.lisp.


5.1.3 Generic functions

Generic Function: unix-socket-stream (sock)
Package

unix-sockets.

Methods
Method: unix-socket-stream (sock)
Source

unix-sockets.lisp.


5.1.4 Standalone methods

Method: close ((stream internal-stream) &key abort)
Source

streams.lisp.

Method: initialize-instance :after ((s unix-socket) &key fd &allow-other-keys)
Source

unix-sockets.lisp.

Method: output-files ((o compile-op) (c lib-source-file))
Package

asdf/action.

Source

unix-sockets.asd.

Method: perform ((o compile-op) (c lib-source-file))
Package

asdf/action.

Source

unix-sockets.asd.

Method: perform ((o load-op) (c lib-source-file))
Package

asdf/action.

Source

unix-sockets.asd.

Method: print-object ((e unix-socket-error) out)
Source

unix-sockets.lisp.

Method: print-object ((s unix-socket) stream)
Source

unix-sockets.lisp.

Method: stream-read-byte ((stream internal-stream))
Package

sb-gray.

Source

streams.lisp.

Method: stream-write-byte ((stream internal-stream) byte)
Package

sb-gray.

Source

streams.lisp.


5.1.5 Conditions

Condition: unix-socket-error
Package

unix-sockets.

Source

unix-sockets.lisp.

Direct superclasses

simple-error.

Direct methods

print-object.


5.2 Internals


5.2.1 Constants

Constant: +af-unix+
Package

unix-sockets.

Source

unix-sockets.lisp.

Constant: +buf-size+
Package

unix-sockets.

Source

unix-sockets.lisp.

Constant: +econnreset+
Package

unix-sockets.

Source

unix-sockets.lisp.

Constant: +max-path-len+
Package

unix-sockets.

Source

unix-sockets.lisp.

Constant: +shut-rdrw+
Package

unix-sockets.

Source

unix-sockets.lisp.

Constant: +sock-stream+
Package

unix-sockets.

Source

unix-sockets.lisp.


5.2.2 Special variables

Special Variable: *library-file-dir*
Package

unix-sockets-asdf.

Source

unix-sockets.asd.

Special Variable: *use-internal-stream-p*

Documentation, a flag whether to use the internal stream or use native socket IO code. Do not modify this. This is mainly used a means for testability.

Package

unix-sockets.

Source

unix-sockets.lisp.


5.2.3 Ordinary functions

Function: %%listen (sock backlog)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: %accept (fd sockaddr addr-len)
Package

unix-sockets.

Source

ffi.lisp.

Function: %close (fd)
Package

unix-sockets.

Source

ffi.lisp.

Function: %listen (fd backlog)
Package

unix-sockets.

Source

ffi.lisp.

Function: %make-unix-socket (path bind-fn)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: %recv (fd buf count flags)
Package

unix-sockets.

Source

ffi.lisp.

Function: %shutdown (fd how)
Package

unix-sockets.

Source

ffi.lisp.

Function: %unix-socket-errno ()
Package

unix-sockets.

Source

ffi.lisp.

Function: %unix-socket-stream (sock)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: %write (fd buf count)
Package

unix-sockets.

Source

ffi.lisp.

Function: bind (fd sockaddr addr-len)
Package

unix-sockets.

Source

ffi.lisp.

Function: char-array-to-pointer (x)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: connect (fd sockaddr addr-len)
Package

unix-sockets.

Source

ffi.lisp.

Function: errno ()
Package

unix-sockets.

Source

ffi.lisp.

Function: native-so ()
Package

unix-sockets.

Source

ffi.lisp.

Function: pcheck (e)
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: socket (domain type protocol)
Package

unix-sockets.

Source

ffi.lisp.

Function: strerror (errnum)
Package

unix-sockets.

Source

ffi.lisp.

Function: throw-errno ()
Package

unix-sockets.

Source

unix-sockets.lisp.

Function: unix-socket-is-ready (fd)
Package

unix-sockets.

Source

ffi.lisp.

Function: unix-socket-make-sockaddr (path)
Package

unix-sockets.

Source

ffi.lisp.

Function: unix-socket-sockaddr-size ()
Package

unix-sockets.

Source

ffi.lisp.


5.2.4 Generic functions

Generic Reader: buf (object)
Package

unix-sockets.

Methods
Reader Method: buf ((unix-socket unix-socket))

automatically generated reader method

Source

unix-sockets.lisp.

Target Slot

buf.

Generic Writer: (setf buf) (object)
Package

unix-sockets.

Methods
Writer Method: (setf buf) ((unix-socket unix-socket))

automatically generated writer method

Source

unix-sockets.lisp.

Target Slot

buf.

Generic Reader: fd (object)
Package

unix-sockets.

Methods
Reader Method: fd ((unix-socket unix-socket))

automatically generated reader method

Source

unix-sockets.lisp.

Target Slot

fd.

Generic Writer: (setf fd) (object)
Package

unix-sockets.

Methods
Writer Method: (setf fd) ((unix-socket unix-socket))

automatically generated writer method

Source

unix-sockets.lisp.

Target Slot

fd.

Generic Reader: id (object)
Package

unix-sockets.

Methods
Reader Method: id ((unix-socket unix-socket))

automatically generated reader method

Source

unix-sockets.lisp.

Target Slot

id.

Generic Writer: (setf id) (object)
Package

unix-sockets.

Methods
Writer Method: (setf id) ((unix-socket unix-socket))

automatically generated writer method

Source

unix-sockets.lisp.

Target Slot

id.

Generic Reader: sock (object)
Package

unix-sockets.

Methods
Reader Method: sock ((internal-stream internal-stream))

automatically generated reader method

Source

streams.lisp.

Target Slot

sock.

Generic Writer: (setf sock) (object)
Package

unix-sockets.

Methods
Writer Method: (setf sock) ((internal-stream internal-stream))

automatically generated writer method

Source

streams.lisp.

Target Slot

sock.


5.2.5 Classes

Class: internal-stream
Package

unix-sockets.

Source

streams.lisp.

Direct superclasses
  • fundamental-binary-input-stream.
  • fundamental-binary-output-stream.
Direct methods
Direct slots
Slot: sock
Initargs

:sock

Readers

sock.

Writers

(setf sock).

Class: lib-source-file
Package

unix-sockets-asdf.

Source

unix-sockets.asd.

Direct superclasses

c-source-file.

Direct methods
Class: sockaddr-un-tclass
Package

unix-sockets.

Source

ffi.lisp.

Direct superclasses
  • foreign-struct-type.
  • translatable-foreign-type.
Class: unix-socket
Package

unix-sockets.

Source

unix-sockets.lisp.

Direct methods
Direct slots
Slot: fd
Initargs

:fd

Readers

fd.

Writers

(setf fd).

Slot: id
Initform

(random 10000000)

Readers

id.

Writers

(setf id).

Slot: stream
Package

common-lisp.

Slot: buf
Readers

buf.

Writers

(setf buf).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   E   F   G   I   M   N   O   P   S   T   U   W  
Index Entry  Section

%
%%listen: Private ordinary functions
%accept: Private ordinary functions
%close: Private ordinary functions
%listen: Private ordinary functions
%make-unix-socket: Private ordinary functions
%recv: Private ordinary functions
%shutdown: Private ordinary functions
%unix-socket-errno: Private ordinary functions
%unix-socket-stream: Private ordinary functions
%write: Private ordinary functions

(
(setf buf): Private generic functions
(setf buf): Private generic functions
(setf fd): Private generic functions
(setf fd): Private generic functions
(setf id): Private generic functions
(setf id): Private generic functions
(setf sock): Private generic functions
(setf sock): Private generic functions

A
accept-unix-socket: Public ordinary functions

B
bind: Private ordinary functions
buf: Private generic functions
buf: Private generic functions

C
char-array-to-pointer: Private ordinary functions
close: Public standalone methods
close-unix-socket: Public ordinary functions
connect: Private ordinary functions
connect-unix-socket: Public ordinary functions

E
errno: Private ordinary functions

F
fd: Private generic functions
fd: Private generic functions
Function, %%listen: Private ordinary functions
Function, %accept: Private ordinary functions
Function, %close: Private ordinary functions
Function, %listen: Private ordinary functions
Function, %make-unix-socket: Private ordinary functions
Function, %recv: Private ordinary functions
Function, %shutdown: Private ordinary functions
Function, %unix-socket-errno: Private ordinary functions
Function, %unix-socket-stream: Private ordinary functions
Function, %write: Private ordinary functions
Function, accept-unix-socket: Public ordinary functions
Function, bind: Private ordinary functions
Function, char-array-to-pointer: Private ordinary functions
Function, close-unix-socket: Public ordinary functions
Function, connect: Private ordinary functions
Function, connect-unix-socket: Public ordinary functions
Function, errno: Private ordinary functions
Function, make-unix-socket: Public ordinary functions
Function, native-so: Private ordinary functions
Function, pcheck: Private ordinary functions
Function, shutdown-unix-socket: Public ordinary functions
Function, socket: Private ordinary functions
Function, strerror: Private ordinary functions
Function, throw-errno: Private ordinary functions
Function, unix-socket-error: Public ordinary functions
Function, unix-socket-is-ready: Private ordinary functions
Function, unix-socket-make-sockaddr: Private ordinary functions
Function, unix-socket-sockaddr-size: Private ordinary functions

G
Generic Function, (setf buf): Private generic functions
Generic Function, (setf fd): Private generic functions
Generic Function, (setf id): Private generic functions
Generic Function, (setf sock): Private generic functions
Generic Function, buf: Private generic functions
Generic Function, fd: Private generic functions
Generic Function, id: Private generic functions
Generic Function, sock: Private generic functions
Generic Function, unix-socket-stream: Public generic functions

I
id: Private generic functions
id: Private generic functions
initialize-instance: Public standalone methods

M
Macro, with-unix-socket: Public macros
make-unix-socket: Public ordinary functions
Method, (setf buf): Private generic functions
Method, (setf fd): Private generic functions
Method, (setf id): Private generic functions
Method, (setf sock): Private generic functions
Method, buf: Private generic functions
Method, close: Public standalone methods
Method, fd: Private generic functions
Method, id: Private generic functions
Method, initialize-instance: Public standalone methods
Method, output-files: Public standalone methods
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, sock: Private generic functions
Method, stream-read-byte: Public standalone methods
Method, stream-write-byte: Public standalone methods
Method, unix-socket-stream: Public generic functions

N
native-so: Private ordinary functions

O
output-files: Public standalone methods

P
pcheck: Private ordinary functions
perform: Public standalone methods
perform: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

S
shutdown-unix-socket: Public ordinary functions
sock: Private generic functions
sock: Private generic functions
socket: Private ordinary functions
stream-read-byte: Public standalone methods
stream-write-byte: Public standalone methods
strerror: Private ordinary functions

T
throw-errno: Private ordinary functions

U
unix-socket-error: Public ordinary functions
unix-socket-is-ready: Private ordinary functions
unix-socket-make-sockaddr: Private ordinary functions
unix-socket-sockaddr-size: Private ordinary functions
unix-socket-stream: Public generic functions
unix-socket-stream: Public generic functions

W
with-unix-socket: Public macros


A.4 Data types