komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

feat(wm): add tcp event notifications

Open Yusuf007R opened this issue 2 years ago • 3 comments

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

  1. Which TCP Errors should be manage here
  2. Is this okay at this line?

Yusuf007R avatar Oct 14 '22 14:10 Yusuf007R

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"),
    );
}

LGUG2Z avatar Feb 13 '23 16:02 LGUG2Z

sorry i was super busy, do you still think the same about this feature?

Yusuf007R avatar Jun 09 '23 02:06 Yusuf007R

Yeah, try implementing those changes and see if everything still works, then I can check out the branch and do a final review.

LGUG2Z avatar Jun 26 '23 18:06 LGUG2Z

Gonna close this out now since we have the komorebi_client crate and I want to centralize all future IPC work around UDS.

LGUG2Z avatar Mar 26 '24 00:03 LGUG2Z