Skip to content

allow saned to listen on specified port, or an ephemeral port

James Ring requested to merge sjamesr/backends:port into master

In developing jfreesane (pure Java client for saned), I've found that it's useful to run saned locally with a known configuration (e.g. 1 test device, 4 test devices, various test device configurations). This is complicated by the fact that saned will only ever listen on sane-port as specified in /etc/services, or 6566 if that entry is not present.

This change allows saned to run on a specified port. If the selected port is zero, an ephemeral port is chosen and logged. Tests using saned in this manner can look through saned's stderr to find what port to connect to.

Edited by James Ring

Merge request reports