reactive-ipc / reactive-ipc-jvm

Reactive IPC for the JVM
Apache License 2.0
55 stars 13 forks source link

Should a `TcpConnection` provide a `close`? #9

Open NiteshKant opened 9 years ago

NiteshKant commented 9 years ago

Currently a Connection is a Publisher<T> which essentially means that an unsubscription from this connection would result in a close.

The issue with this approach is that for consumers that do not want to consume the content of the connection have no easy way to close the connection as typically they will not subscribe to the content.

jbrisbin commented 9 years ago

Isn't that what the Subscription.cancel() method is for?

NiteshKant commented 9 years ago

Isn't that what the Subscription.cancel() method is for?

Yes. Although, the case in point here is to support a usecase of ignoreContent where in the receiver is not interested in the incoming content at all and hence will never subscribe.