The unix-sockets Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The unix-sockets Reference Manual

This is the unix-sockets Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 15:27:04 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

UNIX socket support for Common Lisp

Most major Lisp implementations don't come with any in-built support for UNIX sockets. This is a simple library that provides a reasonable implementation using FFI.

At the moment I'm prioritizing stability over performance (so for instance I don't have stream-read-sequence implemented). In the future, we'll add those tweaks.

Author

Arnold Noronha arnold@tdrhq.com


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 unix-sockets

Author

Arnold Noronha <arnold@tdrhq.com>

License

Apache License, Version 2.0

Description

UNIX Domain socket

Dependencies
Source

unix-sockets.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Next: , Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 unix-sockets.asd

Location

unix-sockets.asd

Systems

unix-sockets (system)

Packages

unix-sockets-asdf

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 unix-sockets/package.lisp

Parent

unix-sockets (system)

Location

package.lisp

Packages

unix-sockets


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 unix-sockets/unix-sockets.lisp

Dependency

unix_sockets.c (file)

Parent

unix-sockets (system)

Location

unix-sockets.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Files   [Contents][Index]

3.2 C


Previous: , Up: C files   [Contents][Index]

3.2.1 unix-sockets/unix_sockets.c

Dependency

package.lisp (file)

Parent

unix-sockets (system)

Location

unix_sockets.c


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 unix-sockets-asdf

Source

unix-sockets.asd

Use List
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.2 unix-sockets

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: with-unix-socket (SCK FN) &body BODY
Package

unix-sockets

Source

unix-sockets.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: accept-unix-socket SOCK
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: close-unix-socket SOCK
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: connect-unix-socket PATH
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: make-unix-socket PATH &key BACKLOG
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: shutdown-unix-socket SOCK
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: unix-socket-error FMT &rest ARGS
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: unix-socket-stream SOCK
Package

unix-sockets

Source

unix-sockets.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Conditions

Condition: unix-socket-error ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Direct superclasses

simple-error (condition)

Direct methods

print-object (method)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +af-unix+
Package

unix-sockets

Source

unix-sockets.lisp (file)

Constant: +buf-size+
Package

unix-sockets

Source

unix-sockets.lisp (file)

Constant: +econnreset+
Package

unix-sockets

Source

unix-sockets.lisp (file)

Constant: +max-path-len+
Package

unix-sockets

Source

unix-sockets.lisp (file)

Constant: +shut-rdrw+
Package

unix-sockets

Source

unix-sockets.lisp (file)

Constant: +sock-stream+
Package

unix-sockets

Source

unix-sockets.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *library-file-dir*
Package

unix-sockets-asdf

Source

unix-sockets.asd


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: %%listen SOCK BACKLOG
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %accept FD SOCKADDR ADDR-LEN
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %close FD
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %listen FD BACKLOG
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %make-unix-socket PATH BIND-FN
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %recv FD BUF COUNT FLAGS
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %shutdown FD HOW
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %unix-socket-errno ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: %write FD BUF COUNT
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: bind FD SOCKADDR ADDR-LEN
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: char-array-to-pointer X
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: connect FD SOCKADDR ADDR-LEN
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: errno ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: pcheck E
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: socket DOMAIN TYPE PROTOCOL
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: strerror ERRNUM
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: throw-errno ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: unix-socket-is-ready FD
Package

unix-sockets

Source

unix-sockets.lisp (file)

Function: unix-socket-make-sockaddr PATH
Package

unix-sockets

Source

unix-sockets.lisp (file)

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

unix-sockets

Source

unix-sockets.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: buf OBJECT
Generic Function: (setf buf) NEW-VALUE OBJECT
Package

unix-sockets

Methods
Method: buf (UNIX-SOCKET unix-socket)

automatically generated reader method

Source

unix-sockets.lisp (file)

Method: (setf buf) NEW-VALUE (UNIX-SOCKET unix-socket)

automatically generated writer method

Source

unix-sockets.lisp (file)

Generic Function: close-fn OBJECT
Generic Function: (setf close-fn) NEW-VALUE OBJECT
Package

unix-sockets

Methods
Method: close-fn (UNIX-SOCKET unix-socket)

automatically generated reader method

Source

unix-sockets.lisp (file)

Method: (setf close-fn) NEW-VALUE (UNIX-SOCKET unix-socket)

automatically generated writer method

Source

unix-sockets.lisp (file)

Generic Function: fd OBJECT
Generic Function: (setf fd) NEW-VALUE OBJECT
Package

unix-sockets

Methods
Method: fd (UNIX-SOCKET unix-socket)

automatically generated reader method

Source

unix-sockets.lisp (file)

Method: (setf fd) NEW-VALUE (UNIX-SOCKET unix-socket)

automatically generated writer method

Source

unix-sockets.lisp (file)

Generic Function: id OBJECT
Generic Function: (setf id) NEW-VALUE OBJECT
Package

unix-sockets

Methods
Method: id (UNIX-SOCKET unix-socket)

automatically generated reader method

Source

unix-sockets.lisp (file)

Method: (setf id) NEW-VALUE (UNIX-SOCKET unix-socket)

automatically generated writer method

Source

unix-sockets.lisp (file)

Generic Function: sock OBJECT
Generic Function: (setf sock) NEW-VALUE OBJECT
Package

unix-sockets

Methods
Method: sock (INTERNAL-STREAM internal-stream)

automatically generated reader method

Source

unix-sockets.lisp (file)

Method: (setf sock) NEW-VALUE (INTERNAL-STREAM internal-stream)

automatically generated writer method

Source

unix-sockets.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Classes

Class: internal-stream ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Direct superclasses
  • fundamental-binary-output-stream (class)
  • fundamental-binary-input-stream (class)
Direct methods
  • stream-read-byte (method)
  • close (method)
  • stream-write-byte (method)
  • sock (method)
  • sock (method)
Direct slots
Slot: sock
Initargs

:sock

Readers

sock (generic function)

Writers

(setf sock) (generic function)

Class: lib-source-file ()
Package

unix-sockets-asdf

Source

unix-sockets.asd

Direct superclasses

c-source-file (class)

Direct methods
  • perform (method)
  • perform (method)
  • output-files (method)
Class: sockaddr-un-tclass ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)
Class: unix-socket ()
Package

unix-sockets

Source

unix-sockets.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • initialize-instance (method)
  • print-object (method)
  • buf (method)
  • buf (method)
  • close-fn (method)
  • close-fn (method)
  • id (method)
  • id (method)
  • fd (method)
  • fd (method)
Direct slots
Slot: fd
Initargs

:fd

Readers

fd (generic function)

Writers

(setf fd) (generic function)

Slot: id
Initform

(random 10000000)

Readers

id (generic function)

Writers

(setf id) (generic function)

Slot: close-fn
Readers

close-fn (generic function)

Writers

(setf close-fn) (generic function)

Slot: buf
Readers

buf (generic function)

Writers

(setf buf) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   U  
Index Entry  Section

C
C File, unix-sockets/unix_sockets.c: The unix-sockets/unix_sockets․c file

F
File, C, unix-sockets/unix_sockets.c: The unix-sockets/unix_sockets․c file
File, Lisp, unix-sockets.asd: The unix-sockets․asd file
File, Lisp, unix-sockets/package.lisp: The unix-sockets/package․lisp file
File, Lisp, unix-sockets/unix-sockets.lisp: The unix-sockets/unix-sockets․lisp file

L
Lisp File, unix-sockets.asd: The unix-sockets․asd file
Lisp File, unix-sockets/package.lisp: The unix-sockets/package․lisp file
Lisp File, unix-sockets/unix-sockets.lisp: The unix-sockets/unix-sockets․lisp file

U
unix-sockets.asd: The unix-sockets․asd file
unix-sockets/package.lisp: The unix-sockets/package․lisp file
unix-sockets/unix-sockets.lisp: The unix-sockets/unix-sockets․lisp file
unix-sockets/unix_sockets.c: The unix-sockets/unix_sockets․c file

Jump to:   C   F   L   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

%
%%listen: Internal functions
%accept: Internal functions
%close: Internal functions
%listen: Internal functions
%make-unix-socket: Internal functions
%recv: Internal functions
%shutdown: Internal functions
%unix-socket-errno: Internal functions
%write: Internal functions

(
(setf buf): Internal generic functions
(setf buf): Internal generic functions
(setf close-fn): Internal generic functions
(setf close-fn): Internal generic functions
(setf fd): Internal generic functions
(setf fd): Internal generic functions
(setf id): Internal generic functions
(setf id): Internal generic functions
(setf sock): Internal generic functions
(setf sock): Internal generic functions

A
accept-unix-socket: Exported functions

B
bind: Internal functions
buf: Internal generic functions
buf: Internal generic functions

C
char-array-to-pointer: Internal functions
close-fn: Internal generic functions
close-fn: Internal generic functions
close-unix-socket: Exported functions
connect: Internal functions
connect-unix-socket: Exported functions

E
errno: Internal functions

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

G
Generic Function, (setf buf): Internal generic functions
Generic Function, (setf close-fn): Internal generic functions
Generic Function, (setf fd): Internal generic functions
Generic Function, (setf id): Internal generic functions
Generic Function, (setf sock): Internal generic functions
Generic Function, buf: Internal generic functions
Generic Function, close-fn: Internal generic functions
Generic Function, fd: Internal generic functions
Generic Function, id: Internal generic functions
Generic Function, sock: Internal generic functions

I
id: Internal generic functions
id: Internal generic functions

M
Macro, with-unix-socket: Exported macros
make-unix-socket: Exported functions
Method, (setf buf): Internal generic functions
Method, (setf close-fn): Internal generic functions
Method, (setf fd): Internal generic functions
Method, (setf id): Internal generic functions
Method, (setf sock): Internal generic functions
Method, buf: Internal generic functions
Method, close-fn: Internal generic functions
Method, fd: Internal generic functions
Method, id: Internal generic functions
Method, sock: Internal generic functions

P
pcheck: Internal functions

S
shutdown-unix-socket: Exported functions
sock: Internal generic functions
sock: Internal generic functions
socket: Internal functions
strerror: Internal functions

T
throw-errno: Internal functions

U
unix-socket-error: Exported functions
unix-socket-is-ready: Internal functions
unix-socket-make-sockaddr: Internal functions
unix-socket-sockaddr-size: Internal functions
unix-socket-stream: Exported functions

W
with-unix-socket: Exported macros

Jump to:   %   (  
A   B   C   E   F   G   I   M   P   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
B   C   F   I   S  
Index Entry  Section

*
*library-file-dir*: Internal special variables

+
+af-unix+: Internal constants
+buf-size+: Internal constants
+econnreset+: Internal constants
+max-path-len+: Internal constants
+shut-rdrw+: Internal constants
+sock-stream+: Internal constants

B
buf: Internal classes

C
close-fn: Internal classes
Constant, +af-unix+: Internal constants
Constant, +buf-size+: Internal constants
Constant, +econnreset+: Internal constants
Constant, +max-path-len+: Internal constants
Constant, +shut-rdrw+: Internal constants
Constant, +sock-stream+: Internal constants

F
fd: Internal classes

I
id: Internal classes

S
Slot, buf: Internal classes
Slot, close-fn: Internal classes
Slot, fd: Internal classes
Slot, id: Internal classes
Slot, sock: Internal classes
sock: Internal classes
Special Variable, *library-file-dir*: Internal special variables

Jump to:   *   +  
B   C   F   I   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   I   L   P   S   U  
Index Entry  Section

C
Class, internal-stream: Internal classes
Class, lib-source-file: Internal classes
Class, sockaddr-un-tclass: Internal classes
Class, unix-socket: Internal classes
Condition, unix-socket-error: Exported conditions

I
internal-stream: Internal classes

L
lib-source-file: Internal classes

P
Package, unix-sockets: The unix-sockets package
Package, unix-sockets-asdf: The unix-sockets-asdf package

S
sockaddr-un-tclass: Internal classes
System, unix-sockets: The unix-sockets system

U
unix-socket: Internal classes
unix-socket-error: Exported conditions
unix-sockets: The unix-sockets system
unix-sockets: The unix-sockets package
unix-sockets-asdf: The unix-sockets-asdf package

Jump to:   C   I   L   P   S   U