相关代码 |
|
/** * Echoes back whatever is thrown at it (with a at end for browsers) ... * @author Jeremy Rayner * * invoke using * groovy -l 80 Reflections.groovy * * (where 80 is the port to listen for requests upon) */ // echo, echo, echo... println "${line} " //assume no input means we've finished... if (line == "") { // clean up gracefully, closing sockets etc return "success" }