komorebi
komorebi copied to clipboard
feat(wm): add tcp event notifications
This PR allow TCP to receive event notifications. That way if you want to make a custom input handler you do not have to connect to TCP socket and create a named pipe at the same time.
There are some things that I'm not sure how they should be handled
Finally coming back to this 😅
For 1) I think we can just log the errors for now and figure out if we need to handle them with specific actions in the future.
For 2) I think we can scope this and avoid the drop; try wrapping it in {}
and it will be auto-dropped at the end of the block.
{
let mut connections = TCP_CONNECTIONS.lock();
connections.insert(
addr.clone(),
stream.try_clone().expect("stream should be cloneable"),
);
}
sorry i was super busy, do you still think the same about this feature?
Yeah, try implementing those changes and see if everything still works, then I can check out the branch and do a final review.
Gonna close this out now since we have the komorebi_client
crate and I want to centralize all future IPC work around UDS.