add Tcp.register overload with keepOpenOnPeerClosed parameter for Java usage

This commit is contained in:
Johannes Rudolph 2013-04-09 11:07:53 +02:00
parent e532a77824
commit 5f58c54bdb
2 changed files with 5 additions and 1 deletions

View file

@ -217,6 +217,7 @@ object TcpMessage {
backlog: Int): Command = Bind(handler, endpoint, backlog, Nil)
def register(handler: ActorRef): Command = Register(handler)
def register(handler: ActorRef, keepOpenOnPeerClosed: Boolean): Command = Register(handler, keepOpenOnPeerClosed)
def unbind: Command = Unbind
def close: Command = Close

View file

@ -442,7 +442,10 @@ successful, the listener will be notified with ``ConfirmedClosed``.
``Abort`` will immediately terminate the connection by sending a ``RST`` message to the remote endpoint. Pending
writes will be not flushed. If the close is successful, the listener will be notified with ``Aborted``.
``PeerClosed`` will be sent to the listener if the connection has been closed by the remote endpoint.
``PeerClosed`` will be sent to the listener if the connection has been closed by the remote endpoint. Per default, the
connection will then automatically be closed from this endpoint as well. To support half-closed connections set the
``keepOpenOnPeerClosed`` member of the ``Register`` message to ``true`` in which case the connection stays open until
it receives one of the above close commands.
``ErrorClosed`` will be sent to the listener whenever an error happened that forced the connection to be closed.