The find-port Reference Manual

This is the find-port Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 18:04:17 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 find-port

Find open ports programmatically.

Maintainer

Fernando Borretti <>

Author

Fernando Borretti <>

Home Page

https://github.com/eudoxia0/find-port

Source Control

(GIT git@github.com:eudoxia0/find-port.git)

Bug Tracker

https://github.com/eudoxia0/find-port/issues

License

MIT

Long Description

# find-port

![GitHub Actions build status badge.](https://github.com/eudoxia0/find-port/actions/workflows/test.yaml/badge.svg) [![Quicklisp](http://quickdocs.org/badge/find-port.svg)](http://quickdocs.org/find-port/)

Find open ports programmatically.

# Overview

“‘lisp
CL-USER> (find-port:port-open-p 5000)
T
CL-USER> (my-clack-app:start)
To load "clack-handler-hunchentoot":
Load 1 ASDF system:
clack-handler-hunchentoot
; Loading "clack-handler-hunchentoot"

Hunchentoot server is started.
Listening on localhost:5000.
T
CL-USER> (find-port:port-open-p 5000)
NIL
CL-USER> (find-port:find-port)
50123
“‘

# Usage

The ‘port-open-p‘ function takes an integer and determines whether a port by
that number is open.

The ‘find-port‘ function, by default takes no arguments, and returns an open
port. Two keyword arguments, ‘:min‘ and ‘:max‘, may be given to constrain the
port range in which to search for ports.

By default, the range is from 40000 to 50000, since this function will probably
be used e.g. to pick an open port for testing, rather than to pick a port to run
a production server on.

# License

Copyright (c) 2015 Fernando Borretti

Licensed under the MIT License.

Version

0.1

Dependency

usocket (system).

Source

find-port.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 find-port/src

Source

find-port.asd.

Parent Component

find-port (system).

Child Component

find-port.lisp (file).


4 Files

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


4.1 Lisp


4.1.1 find-port/find-port.asd

Source

find-port.asd.

Parent Component

find-port (system).

ASDF Systems

find-port.


4.1.2 find-port/src/find-port.lisp

Source

find-port.asd.

Parent Component

src (module).

Packages

find-port.

Public Interface

5 Packages

Packages are listed by definition order.


5.1 find-port

Source

find-port.lisp.

Use List

common-lisp.

Public Interface

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *default-interface*
Package

find-port.

Source

find-port.lisp.


6.1.2 Ordinary functions

Function: find-port (&key min max interface)

Return the first available port in a range of port numbers.

Package

find-port.

Source

find-port.lisp.

Function: port-open-p (port &key interface)

Determine if the port is open.

Package

find-port.

Source

find-port.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*default-interface*: Public special variables

S
Special Variable, *default-interface*: Public special variables