# inet::TcpServerSocket

    sys::Obj
      inet::TcpServerSocket

`public class TcpServerSocket` `[javaPeer]`

TcpServerSocket is used to open a socket for listening and accepting incoming TCP connections.

accept

  `public native bool accept(TcpSocket socket)`

  Poll the server socket to see if there are any pending connections. If a connection is pending then setup the specified socket instance to handle the incoming connection. The socket passed in must be closed, and if successful will be open on return. Return true if a connection was successfully accepted or false if there are no pending connections.

bind

  `public native bool bind(int port)`

  Bind this socket the specified well-known port on this machine. Return true on success, false on failure.

close

  `public native void close()`

  Shutdown and close this server socket.

isClosed

  `public bool isClosed()`

  Is this server socket closed.