diff --git a/examples/coap-server.c b/examples/coap-server.c index d21bf3f1..a2505e46 100644 --- a/examples/coap-server.c +++ b/examples/coap-server.c @@ -1998,7 +1998,9 @@ usage( const char *program, const char *version) { "\t-l loss%%\tRandomly fail to send datagrams with the specified\n" "\t \t\tprobability - 100%% all datagrams, 0%% no datagrams\n" "\t \t\t(for debugging only)\n" - "\t-p port\t\tListen on specified port\n" + "\t-p port\t\tListen on specified port for UDP and TCP. If (D)TLS is\n" + "\t \t\tenabled, then the coap-server will also listen on\n" + "\t \t\t 'port'+1 for DTLS and TLS. The default port is 5683\n" "\t-v num \t\tVerbosity level (default 3, maximum is 9). Above 7,\n" "\t \t\tthere is increased verbosity in GnuTLS and OpenSSL logging\n" "\t-A address\tInterface address to bind to\n" diff --git a/man/coap-server.txt.in b/man/coap-server.txt.in index ac729322..3cd638c1 100644 --- a/man/coap-server.txt.in +++ b/man/coap-server.txt.in @@ -171,21 +171,22 @@ EXAMPLES ---- coap-server -A ::1 ---- -Let the server listen on localhost (port '5683'). +Let the server listen on localhost (port '5683') for UDP/TCP. * Example ---- coap-server -A ::1 -k mysecretKey -h myhint ---- -Let the server listen on localhost (port '5683' and '5684') with the server -set up for PSK authentication. +Let the server listen on localhost (port '5683' for UDP/TCP and port '5684' for +DTLS/TLS) with the server set up for PSK authentication if the client uses +coaps:// or coaps+tcp://. * Example ---- -coap-server -A ::1 -p 13011 +coap-server -A ::1 -k mysecretKey -h myhint -p 13011 ---- -The same, except the listening port is '13011' (and not the default port -'5683'). +The same, except the UDP/TCP listening port is '13011' and the DTLS/TLS +listening port is '13012' (and not the default ports '5683' and '5684'). * Example ----