interact icon indicating copy to clipboard operation
interact copied to clipboard

Client / Server Support

Open mmstick opened this issue 6 years ago • 2 comments

This could be useful in a wide range of applications, if it had the capability to act in a client / server manner.

For example, GTK provides a useful tool for debugging and manipulating GTK widget properties in any GTK application externally with the GTK Inspector. A similar capability could be offered by this and OrbTk.

Varlink could be used as a protocol for communicating messages back and forth between a pipe, UNIX socket, TCP socket, scheme, etc.

mmstick avatar Mar 07 '19 23:03 mmstick

I agree, thanks for the suggestion!

Although this may require changes in API, it does not seem too difficult to implement.

da-x avatar Mar 17 '19 10:03 da-x

I expect it to be available over arbitrary std::io::Read + std::io::Write.

There can be something like

pub fn direct_with_io<H,IO>(settings: Settings, handler: H, io: IO) -> Result<(), PromptError> where
    H: Handler + Send + Sync + 'static, 
    IO: std::io::Read + std::io::Write + ...,

with direct just delegating to it with a stdio-based IO.

vi avatar Apr 10 '19 21:04 vi