The trivial-sockets Reference Manual

Table of Contents

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

The trivial-sockets Reference Manual

This is the trivial-sockets Reference Manual, version 0.4, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 16:52:06 2019 GMT+0.


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

1 Introduction

trivial-sockets

A trivial networking library for undemanding Internet applications

Usage examples:

(with-open-stream (s (trivial-sockets:open-stream "www.google.com" 80)) 
  (format s "HEAD / HTTP/1.0~%Host: www.google.com~%~%") 
  (force-output s) 
  (loop 
    (let ((l (read-line s nil nil))) 
      (unless l (return)) 
      (princ l) (terpri))))

(trivial-sockets:with-server (s (:port 8913 :reuse-address t))
   (loop
    (with-open-stream (c (trivial-sockets:accept-connection s)) 
        (read-line c)
        (format c "Hi there!~%"))))

Proper documentation is in trivial-sockets.texi. If you have Texinfo installed you can convert this to DVI or PDF using texi2dvi or texi2pdf, or use makeinfo to create an Info file for use with Emacs or the standalone info reader.

Installation:

Use asdf-install.

Or if you don't have asdf-install but you do have asdf, create a symlink from a directory in your asdf:central-registry and run

Or if you don't have asdf, either (a) get it, or (b) compile the files by hand in an order that satisfies the dependencies in trivial-sockets.asd

References:

http://www.cliki.net/asdf-install http://www.cliki.net/asdf

Thanks to: (alphabetical order)


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 trivial-sockets

Maintainer

Chun Tian (binghe)

Author

Daniel Barlow

License

MIT

Description

A trivial networking library for undemanding Internet applications

Version

0.4

Dependency

sb-bsd-sockets

Source

trivial-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.


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

3.1 Lisp


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

3.1.1 trivial-sockets.asd

Location

trivial-sockets.asd

Systems

trivial-sockets (system)

Packages

trivial-sockets-system


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

3.1.2 trivial-sockets/defpackage.lisp

Parent

trivial-sockets (system)

Location

defpackage.lisp

Packages

trivial-sockets


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

3.1.3 trivial-sockets/errors.lisp

Dependency

defpackage.lisp (file)

Parent

trivial-sockets (system)

Location

errors.lisp

Exported Definitions

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

3.1.4 trivial-sockets/sbcl.lisp

Dependency

defpackage.lisp (file)

Parent

trivial-sockets (system)

Location

sbcl.lisp

Exported Definitions
Internal Definitions

resolve-hostname (function)


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

3.1.5 trivial-sockets/server.lisp

Dependency

defpackage.lisp (file)

Parent

trivial-sockets (system)

Location

server.lisp

Exported Definitions

with-server (macro)


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

4 Packages

Packages are listed by definition order.


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

4.1 trivial-sockets-system

Source

trivial-sockets.asd

Use List

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

4.2 trivial-sockets

Source

defpackage.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

resolve-hostname (function)


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-server (NAME ARGUMENTS) &body FORMS
Package

trivial-sockets

Source

server.lisp (file)


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

5.1.2 Functions

Function: accept-connection SOCKET &key EXTERNAL-FORMAT ELEMENT-TYPE
Package

trivial-sockets

Source

sbcl.lisp (file)

Function: close-server SERVER
Package

trivial-sockets

Source

sbcl.lisp (file)

Function: open-server &key HOST PORT REUSE-ADDRESS BACKLOG PROTOCOL

Returns a SERVER object and the port that was bound, as multiple values

Package

trivial-sockets

Source

sbcl.lisp (file)

Function: open-stream PEER-HOST PEER-PORT &key LOCAL-HOST LOCAL-PORT EXTERNAL-FORMAT ELEMENT-TYPE PROTOCOL
Package

trivial-sockets

Source

sbcl.lisp (file)


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

5.1.3 Generic functions

Generic Function: socket-nested-error CONDITION
Package

trivial-sockets

Methods
Method: socket-nested-error (CONDITION socket-error)
Source

errors.lisp (file)

Generic Function: unsupported-feature CONDITION
Package

trivial-sockets

Methods
Method: unsupported-feature (CONDITION unsupported)
Source

errors.lisp (file)


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

5.1.4 Conditions

Condition: socket-error ()
Package

trivial-sockets

Source

errors.lisp (file)

Direct superclasses

error (condition)

Direct methods

socket-nested-error (method)

Direct slots
Slot: nested-error
Initargs

:nested-error

Readers

socket-nested-error (generic function)

Condition: unsupported ()
Package

trivial-sockets

Source

errors.lisp (file)

Direct superclasses

error (condition)

Direct methods

unsupported-feature (method)

Direct slots
Slot: feature
Initargs

:feature

Readers

unsupported-feature (generic function)


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

5.2 Internal definitions


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

5.2.1 Functions

Function: resolve-hostname NAME
Package

trivial-sockets

Source

sbcl.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, trivial-sockets.asd: The trivial-sockets<dot>asd file
File, Lisp, trivial-sockets/defpackage.lisp: The trivial-sockets/defpackage<dot>lisp file
File, Lisp, trivial-sockets/errors.lisp: The trivial-sockets/errors<dot>lisp file
File, Lisp, trivial-sockets/sbcl.lisp: The trivial-sockets/sbcl<dot>lisp file
File, Lisp, trivial-sockets/server.lisp: The trivial-sockets/server<dot>lisp file

L
Lisp File, trivial-sockets.asd: The trivial-sockets<dot>asd file
Lisp File, trivial-sockets/defpackage.lisp: The trivial-sockets/defpackage<dot>lisp file
Lisp File, trivial-sockets/errors.lisp: The trivial-sockets/errors<dot>lisp file
Lisp File, trivial-sockets/sbcl.lisp: The trivial-sockets/sbcl<dot>lisp file
Lisp File, trivial-sockets/server.lisp: The trivial-sockets/server<dot>lisp file

T
trivial-sockets.asd: The trivial-sockets<dot>asd file
trivial-sockets/defpackage.lisp: The trivial-sockets/defpackage<dot>lisp file
trivial-sockets/errors.lisp: The trivial-sockets/errors<dot>lisp file
trivial-sockets/sbcl.lisp: The trivial-sockets/sbcl<dot>lisp file
trivial-sockets/server.lisp: The trivial-sockets/server<dot>lisp file

Jump to:   F   L   T  

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

A.2 Functions

Jump to:   A   C   F   G   M   O   R   S   U   W  
Index Entry  Section

A
accept-connection: Exported functions

C
close-server: Exported functions

F
Function, accept-connection: Exported functions
Function, close-server: Exported functions
Function, open-server: Exported functions
Function, open-stream: Exported functions
Function, resolve-hostname: Internal functions

G
Generic Function, socket-nested-error: Exported generic functions
Generic Function, unsupported-feature: Exported generic functions

M
Macro, with-server: Exported macros
Method, socket-nested-error: Exported generic functions
Method, unsupported-feature: Exported generic functions

O
open-server: Exported functions
open-stream: Exported functions

R
resolve-hostname: Internal functions

S
socket-nested-error: Exported generic functions
socket-nested-error: Exported generic functions

U
unsupported-feature: Exported generic functions
unsupported-feature: Exported generic functions

W
with-server: Exported macros

Jump to:   A   C   F   G   M   O   R   S   U   W  

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

A.3 Variables

Jump to:   F   N   S  
Index Entry  Section

F
feature: Exported conditions

N
nested-error: Exported conditions

S
Slot, feature: Exported conditions
Slot, nested-error: Exported conditions

Jump to:   F   N   S  

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

A.4 Data types

Jump to:   C   P   S   T   U  
Index Entry  Section

C
Condition, socket-error: Exported conditions
Condition, unsupported: Exported conditions

P
Package, trivial-sockets: The trivial-sockets package
Package, trivial-sockets-system: The trivial-sockets-system package

S
socket-error: Exported conditions
System, trivial-sockets: The trivial-sockets system

T
trivial-sockets: The trivial-sockets system
trivial-sockets: The trivial-sockets package
trivial-sockets-system: The trivial-sockets-system package

U
unsupported: Exported conditions

Jump to:   C   P   S   T   U