Jumpi v1.2.0

Interface TcpAcceptListener

All Known Implementing Classes:

public interface TcpAcceptListener

A TcpAcceptListener receives notification of accepted sockets, which are connection attempts from remote peers. The TcpAcceptListener must decide whether to allow the Socket to be kept or not.

Method Summary
 boolean acceptSocket(java.net.Socket sock)
          Callback notifying that a Socket has been accepted.

Method Detail


public boolean acceptSocket(java.net.Socket sock)
Callback notifying that a Socket has been accepted. The TcpAcceptListener must determine if the Socket shall be kept or discarded. Sockets may not be allowed to be used after accept, since the maximum number of active TcpConnections has been exceeded, or if an existing connection exists for the remote peer etc.

sock - the accepted Socket.
false if the Socket should be discarded and closed, or else kept with true.

Jumpi v1.2.0

Copyright 2003, Peter Jonathan Klauser.