ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
66 stars 29 forks source link

Pass `sockaddr_storage` by reference #176

Closed jaycedowell closed 2 years ago

jaycedowell commented 2 years ago

This PR updates Socket.hpp to pass sockaddr_storage by reference to bind(), connect(), address_string(), and discover_mtu(). There are also a few small cleanups with regards to unused variables and some non-printing characters.

codecov-commenter commented 2 years ago

Codecov Report

Merging #176 (0132eca) into master (a4be8b5) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   66.81%   66.81%           
=======================================
  Files          69       69           
  Lines        7410     7410           
=======================================
  Hits         4951     4951           
  Misses       2459     2459           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c866fd2...0132eca. Read the comment docs.

league commented 2 years ago

Since it passed tests, If you're interested in also moving socket implementations into a .cpp, that's in the branch socket-deinline and could be merged into this PR. Or not, but I'm a little suspicious of this much inline code, I guess. I'll make another inline review comment about a warning I get on Mac with gcc.

league commented 2 years ago

Oh, never mind inline comments, I just added the fixes to socket-deinline, with detailed commit messages. If you decide not to de-inline the socket header, then I can apply those small patches to the same functions in the .hpp on socket-reference.

jaycedowell commented 2 years ago

I also found it a little strange that Socket.hpp was a massive header file filled with everything inline'd. I've merged socket-deinline into socket-reference.

jaycedowell commented 2 years ago

@league I think I'm happy with this now that Socket.cpp is a thing.