Liking cljdoc? Tell your friends :D
Clojure only.

prestancedesign.get-port


get-portclj

(get-port & [options])

Get an available TCP port according to the supplied options.

  • A preferred port: (get-port {:port 3000})
  • A vector of preferred ports: (get-port {:port [3000 3004 3010]})
  • Use the make-range helper in case you need a port in a certain (inclusive) range: (get-port {:port (make-range 3000 3005)})

No args return a random available port

Get an available TCP port according to the supplied options.

- A preferred port: (get-port {:port 3000})
- A vector of preferred ports: (get-port {:port [3000 3004 3010]})
- Use the `make-range` helper in case you need a port in a certain (inclusive) range: (get-port {:port (make-range 3000 3005)})

No args return a random available port
sourceraw docstring

make-rangeclj

(make-range from to)

Make a range of ports. Must be in the range 1024...65535

Make a range of ports.
Must be in the range 1024...65535
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close