See the section called 'ACCESS CONTROL OPTIONS' for information
on limiting the hosts that may connect to the listening Ncat
process.
-l
, --listen
(Listen for connections)
Listen for connections rather than connecting to a remote
machine
-m
numconns, --max-conns
numconns (Specify maximum number of
connections)
The maximum number of simultaneous connections accepted by an
Ncat instance. 100 is the default (60 on Windows).
-k
, --keep-open
(Accept multiple connections)
Normally a listening server accepts only one connection and
then quits when the connection is closed. This option makes
it accept multiple simultaneous connections and wait for more
connections after they have all been closed. It must be
combined with --listen
. In this mode there is no way for Ncat
to know when its network input is finished, so it will keep
running until interrupted. This also means that it will never
close its output stream, so any program reading from Ncat and
looking for end-of-file will also hang.
--broker
(Connection brokering)
Allow multiple parties to connect to a centralised Ncat
server and communicate with each other. Ncat can broker
communication between systems that are behind a NAT or
otherwise unable to directly connect. This option is used in
conjunction with --listen
, which causes the --listen
port to
have broker mode enabled.
--chat
(Ad-hoc 'chat server')
The --chat
option enables chat mode, intended for the
exchange of text between several users. In chat mode,
connection brokering is turned on. Ncat prefixes each message
received with an ID before relaying it to the other
connections. The ID is unique for each connected client. This
helps distinguish who sent what. Additionally, non-printing
characters such as control characters are escaped to keep
them from doing damage to a terminal.