[ 
https://issues.apache.org/jira/browse/GROOVY-12346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111366#comment-18111366
 ] 

ASF GitHub Bot commented on GROOVY-12346:
-----------------------------------------

Copilot commented on code in PR #2869:
URL: https://github.com/apache/groovy/pull/2869#discussion_r3930186680


##########
src/spec/doc/tools-groovy.adoc:
##########
@@ -54,14 +54,29 @@ int (disable any int based optimizations) |
 | -e <script> | | specify an inline command line script | groovy -e "println 
new Date()"
 | -h | --help | Displays usage information for the command line groovy command 
| groovy --help
 | -i <extension> | | modify files in place; create backup if extension is 
given (e.g. '.bak') |
-| -l <port> | | listen on a port and process inbound lines (default: 1960) |
+| -l <[host:]port> | | listen on a port and process inbound lines (default: 
1960); binds the loopback address unless a host is given | groovy -l 
0.0.0.0:1960 -e "line.reverse()"
 | -n | | process files line by line using implicit 'line' variable |
 | -p | | process files line by line and print result (see also -n) |
 | -v | --version | display the Groovy and JVM versions | groovy -v
 | -pa | --parameters | Generates metadata for reflection on method parameter 
names on JDK 8 and above. Defaults to false. | groovy --parameters Person.groovy
 | -pr | --enable-preview | Enable preview Java features (jdk12+ only). | 
groovy --enable-preview Person.groovy
 |=======================================================================
 
+The `-l` option is a developer convenience for experimenting with a line-driven
+script, in the same spirit as `groovysh` but reading from a socket instead of a
+terminal. It is not an application server.
+
+It runs the given script once for every line a client sends, with the
+line available as the implicit `line` variable and the connection as `out` and
+`socket`. The listening socket is bound to the loopback address, so only 
clients on
+the same machine can connect. Supply a host to listen more widely 

> Provide a GroovySocketServer constructor variant with an address
> ----------------------------------------------------------------
>
>                 Key: GROOVY-12346
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12346
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to