ServerSocket (Groovy JDK enhancements)

Package: java.net

## Class ServerSocket

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `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.
    `Socket` | `accept(Closure closure)` Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread.

  - #### Methods inherited from class java.lang.Object

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `contains`, `count`, `dump`, `each`, `eachWithIndex`, `equals`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `flatten`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `groupBy`, `groupBy`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `iterator`, `join`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `size`, `split`, `sprintf`, `sprintf`, `sum`, `sum`, `tap`, `toArrayString`, `toSpreadMap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withTraits`

  - #### Methods inherited from interface java.io.Closeable

    `withCloseable`

  - #### Methods inherited from interface java.lang.AutoCloseable

    `withCloseable`

- - ### Methods Detail

    - #### public 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.

      Parameters:
        `runInANewThread` - This flag should be true, if the closure should be invoked in a new thread, else false.
        `closure` - a Closure
      Returns:
        a Socket
      Since:
        1.7.6
      See Also:
        ServerSocket#accept()

    - #### public Socket accept(Closure closure)

      Accepts a connection and passes the resulting Socket to the closure which runs in a new Thread.

      Parameters:
        `closure` - a Closure
      Returns:
        a Socket
      Since:
        1.0
      See Also:
        ServerSocket#accept()