Return type | Name and parameters |
---|---|
Socket
|
accept(Closure closure)
Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread. |
Socket
|
accept(boolean runInANewThread, Closure closure)
Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread or the calling thread, as needed. |
Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread.
closure
- a Closure.Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread or the calling thread, as needed.
runInANewThread
- This flag should be true, if the closure should be invoked in a new thread, else false..closure
- a Closure.