Full Socket::Option support #4119

Merged
merged 7 commits into from Sep 12, 2016

Projects

None yet

2 participants

@etehtsea
Contributor
etehtsea commented Aug 27, 2016 edited

This PR includes:

  • full (I hope) Socket::Option support;
  • passing Socket::Option as setsockopt argument;
  • fix for the #4040;
  • properly handles socket prefixed options/levels (SOL_LEVEL, SO_OPTION) (fix for the #3438);
  • properly handles unsupported socket constants;
@etehtsea
Contributor
etehtsea commented Sep 8, 2016

@headius: I need this to be merged somewhere to move on. I can retarget it to another branch if needed.

@etehtsea etehtsea changed the title from Getset option linger to Full Socket::Option support Sep 8, 2016
etehtsea and others added some commits Aug 15, 2016
@etehtsea etehtsea Add Socket::Option linger support b25773f
@etehtsea etehtsea Fix passing socket option in a form of SO_OPTION
For example:
Socket::Option.new(:UNSPEC, :SOCKET, :SO_LINGER, [0, 0].pack('i*')
Fixes #3438
a87d873
@headius @etehtsea headius More robust conversion and value-checking.
Covers address family, protocol family, socket type, and protocol.
250f44a
@etehtsea etehtsea Fix passing socket level in a form of SOL_LEVEL
For example:
Socket::Option.int(:AF_UNSPEC, :SOL_SOCKET, :LINGER, 1)
Fixes #3438
8fac9c6
@etehtsea etehtsea More robust conversion and value-checking
Also cover socket level and socket option
abb1a5f
@etehtsea etehtsea Handle Socket::Option as setsockopt arg
Covered by ruby/spec#291
40f6b41
@etehtsea etehtsea Properly handle SO_LINGER set/get sockopt
Fixes #4040
1902354
@headius headius added this to the JRuby 9.1.6.0 milestone Sep 12, 2016
@headius headius merged commit bbceb69 into jruby:master Sep 12, 2016

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@etehtsea etehtsea deleted the etehtsea:getset-option-linger branch Sep 12, 2016
@etehtsea
Contributor

🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment