blinry on Nostr: I'm happy with this interface as long as there's only bytestream-based connections. ...
I'm happy with this interface as long as there's only bytestream-based connections.
My question now is: How could you extend this to support multiple types of connections? For example, I might want to add a connection that sends file system events, and receives file actions.
You'd probably add a "type" parameter to the connect function, so that the daemon knows what kind of connection this is. You could then serialize/deserialize the events, to use the same input/output interface.
My question now is: How could you extend this to support multiple types of connections? For example, I might want to add a connection that sends file system events, and receives file actions.
You'd probably add a "type" parameter to the connect function, so that the daemon knows what kind of connection this is. You could then serialize/deserialize the events, to use the same input/output interface.