Smithay / calloop

A callback-based Event Loop
MIT License
176 stars 34 forks source link

Add socket event source #111

Closed chrisduerr closed 11 months ago

chrisduerr commented 2 years ago

This adds the standard Unix domain socket as a Calloop socket source.

While implementing this should be fairly easy for most calloop consumers, it's also a pretty standard thing to need especially in the context of event loops. So this patch should provide a helpful abstraction saving some time downstream.

codecov[bot] commented 2 years ago

Codecov Report

Merging #111 (15544d4) into master (52daa0b) will decrease coverage by 2.11%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
- Coverage   89.22%   87.10%   -2.12%     
==========================================
  Files          17       18       +1     
  Lines        1698     1737      +39     
==========================================
- Hits         1515     1513       -2     
- Misses        183      224      +41     
Flag Coverage Δ
macos-latest 88.43% <ø> (-0.29%) :arrow_down:
ubuntu-latest 85.14% <0.00%> (-2.30%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sources/generic.rs 84.74% <ø> (ø)
src/sources/mod.rs 95.69% <ø> (ø)
src/sources/socket.rs 0.00% <0.00%> (ø)
src/sources/ping/pipe.rs 97.10% <0.00%> (-1.45%) :arrow_down:
src/sys/mod.rs 90.75% <0.00%> (-0.85%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.