rsocket / rsocket-cli

Command-line client for ReactiveSocket
Apache License 2.0
71 stars 22 forks source link

Incremental emissions for `Publishers.lines()` #23

Closed NiteshKant closed 7 years ago

NiteshKant commented 7 years ago

(This contains changes in #22)

Problem

Currently Publishers.lines() waits for the CharSource to terminate before it emits all the items. This when used with System.in (channel mode) never emits any item.

Modification

Modify the method to emit every line read.

Result

Channel mode works now.

yschimke commented 7 years ago

Thanks for fixing. I'll put back the logger after confirming its still needed and fix teh typo

NiteshKant commented 7 years ago

@yschimke

fix teh typo

How ironic 😉

yschimke commented 7 years ago

I did some quick testing with "-i @/usr/share/dict/words" but I only got a single result "A". Is there anything still missing?

NiteshKant commented 7 years ago

I did some quick testing with "-i @/usr/share/dict/words" but I only got a single result "A". Is there anything still missing?

Did you try with an echo channel implementation? If so, then most likely, it is due to the lack of request-n sent to the server. I tested Publishers with the dictionary and it emits all words.