Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite SocketPlugin to NIO #21

Merged
merged 9 commits into from
Jan 29, 2019
Merged

Rewrite SocketPlugin to NIO #21

merged 9 commits into from
Jan 29, 2019

Conversation

f4lco
Copy link
Collaborator

@f4lco f4lco commented Jan 22, 2019

This PR

  • splits TCP and UDP sockets in separate classes
  • uses non-blocking I/O primitives throughout
  • (reliably) greens dozens of test selectors from SocketTest, SocketStreamTest, SqueakSSLTest, StringSocketTestCase, WebClientServerTest, ...
  • implements features that were missing from the previous implementation: getting / setting socket options, respecting different TCP backlog sizes, and "in-place accept" (such that one can put the socket in listen mode, and call read/write on the same instance, which are then relayed to the last accepted client connection)

@f4lco f4lco requested a review from fniephaus January 22, 2019 11:06
@fniephaus
Copy link
Member

Cool! Thanks a lot, will have a look soon!

@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #21 into dev will increase coverage by 0.65%.
The diff coverage is 65.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev      #21      +/-   ##
============================================
+ Coverage     52.13%   52.78%   +0.65%     
- Complexity     2454     2525      +71     
============================================
  Files           189      193       +4     
  Lines         17061    17069       +8     
  Branches       2403     2362      -41     
============================================
+ Hits           8894     9010     +116     
+ Misses         7231     7134      -97     
+ Partials        936      925      -11
Impacted Files Coverage Δ Complexity Δ
...a/graal/squeak/exceptions/PrimitiveExceptions.java 73.33% <ø> (ø) 0 <0> (ø) ⬇️
.../squeak/nodes/primitives/PrimitiveNodeFactory.java 75.8% <ø> (ø) 20 <0> (ø) ⬇️
...l/squeak/test/AbstractSqueakTestCaseWithImage.java 73.45% <100%> (+0.47%) 28 <0> (ø) ⬇️
...aal/squeak/nodes/plugins/network/SocketPlugin.java 53.5% <53.5%> (ø) 4 <4> (?)
.../squeak/nodes/plugins/network/SqueakUDPSocket.java 65.85% <65.85%> (ø) 11 <11> (?)
...aal/squeak/nodes/plugins/network/SqueakSocket.java 69.87% <69.87%> (ø) 14 <14> (?)
...a/graal/squeak/nodes/plugins/network/Resolver.java 76.47% <76.47%> (ø) 9 <9> (?)
.../squeak/nodes/plugins/network/SqueakTCPSocket.java 84.61% <84.61%> (ø) 35 <35> (?)
...nodes/primitives/impl/MiscellaneousPrimitives.java 59.51% <0%> (-0.35%) 2% <0%> (ø)
... and 7 more

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 a43d0ba...042209a. Read the comment docs.

Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fniephaus fniephaus merged commit d760921 into dev Jan 29, 2019
@fniephaus fniephaus deleted the wip/socket-debug branch January 29, 2019 12:55
@fniephaus fniephaus mentioned this pull request Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants