The find-port Reference Manual

Table of Contents

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

The find-port Reference Manual

This is the find-port Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:38:45 2018 GMT+0.


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

1 Introduction

find-port

Build Status Quicklisp

Find open ports programmatically.

Overview

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.


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 find-port

Maintainer

Fernando Borretti <eudoxiahp@gmail.com>

Author

Fernando Borretti <eudoxiahp@gmail.com>

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

Description

Find open ports programmatically.

Long Description

# find-port

[![Build Status](https://travis-ci.org/eudoxia0/find-port.svg?branch=master)](https://travis-ci.org/eudoxia0/find-port) [![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

Source

find-port.asd (file)

Component

src (module)


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

3 Modules

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


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

3.1 find-port/src

Parent

find-port (system)

Location

src/

Component

find-port.lisp (file)


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

4 Files

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


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

4.1 Lisp


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

4.1.1 find-port.asd

Location

find-port.asd

Systems

find-port (system)


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

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

Parent

src (module)

Location

src/find-port.lisp

Packages

find-port

Exported Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 find-port

Source

find-port.lisp (file)

Use List

common-lisp

Exported Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Functions

Function: find-port &key MIN MAX

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

Package

find-port

Source

find-port.lisp (file)

Function: port-open-p PORT

Determine if the port is open.

Package

find-port

Source

find-port.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, find-port.asd: The find-port<dot>asd file
File, Lisp, find-port/src/find-port.lisp: The find-port/src/find-port<dot>lisp file
find-port.asd: The find-port<dot>asd file
find-port/src: The find-port/src module
find-port/src/find-port.lisp: The find-port/src/find-port<dot>lisp file

L
Lisp File, find-port.asd: The find-port<dot>asd file
Lisp File, find-port/src/find-port.lisp: The find-port/src/find-port<dot>lisp file

M
Module, find-port/src: The find-port/src module

Jump to:   F   L   M  

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

A.2 Functions

Jump to:   F   P  
Index Entry  Section

F
find-port: Exported functions
Function, find-port: Exported functions
Function, port-open-p: Exported functions

P
port-open-p: Exported functions

Jump to:   F   P  

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

A.3 Variables


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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
find-port: The find-port system
find-port: The find-port package

P
Package, find-port: The find-port package

S
System, find-port: The find-port system

Jump to:   F   P   S