<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby.git/ext/socket/ancdata.c, branch ruby_2_4</title>
<subtitle>github.com: ruby/ruby.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/'/>
<entry>
<title>* ext/socket/*.c: Add proper require for example to work.</title>
<updated>2016-10-05T03:57:32+00:00</updated>
<author>
<name>hsbt</name>
<email>hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-10-05T03:57:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=4043565023531d173478c216e2a9cc6228f44a7e'/>
<id>4043565023531d173478c216e2a9cc6228f44a7e</id>
<content type='text'>
  [fix GH-1378][ci skip] Patch by @schneems

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [fix GH-1378][ci skip] Patch by @schneems

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>rb_readwrite_syserr_fail</title>
<updated>2015-12-23T14:58:47+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-23T14:58:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=f9adadc5e610360850b3a4bd9a43e928d1c78bb1'/>
<id>f9adadc5e610360850b3a4bd9a43e928d1c78bb1</id>
<content type='text'>
* io.c (rb_readwrite_syserr_fail): works with the given errno than
  thread local errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* io.c (rb_readwrite_syserr_fail): works with the given errno than
  thread local errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>prefer rb_syserr_fail</title>
<updated>2015-12-23T08:57:48+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-23T08:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=f4166e2dd7a4d9be95f160e19303ddeeb5d27ab4'/>
<id>f4166e2dd7a4d9be95f160e19303ddeeb5d27ab4</id>
<content type='text'>
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno
  over setting errno then call rb_sys_fail, not to be clobbered
  potentially and to reduce thread local errno accesses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno
  over setting errno then call rb_sys_fail, not to be clobbered
  potentially and to reduce thread local errno accesses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/socket/ancdata.c: Check buffer full and ignore MSG_TRUNC flag.</title>
<updated>2015-11-19T13:49:58+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-19T13:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=33b832979b2d01a865a25c9faefe6a3cee6e5dc2'/>
<id>33b832979b2d01a865a25c9faefe6a3cee6e5dc2</id>
<content type='text'>
  buffer fullness is more robust to detect the message is too big for
  the buffer.
  AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is
  given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  buffer fullness is more robust to detect the message is too big for
  the buffer.
  AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is
  given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size</title>
<updated>2015-11-18T17:53:20+00:00</updated>
<author>
<name>usa</name>
<email>usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-18T17:53:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=3006e5ea78a41950e57c8f568fccf26c95ecc1e6'/>
<id>3006e5ea78a41950e57c8f568fccf26c95ecc1e6</id>
<content type='text'>
  only when vmaxdatlen is nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  only when vmaxdatlen is nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size</title>
<updated>2015-11-18T01:37:34+00:00</updated>
<author>
<name>usa</name>
<email>usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-18T01:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=d8e1939232b5f12ae79aca0975ef222008f4454b'/>
<id>d8e1939232b5f12ae79aca0975ef222008f4454b</id>
<content type='text'>
  when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
  (such as, Windows).  fixes a test error revealed by r52625.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
  (such as, Windows).  fixes a test error revealed by r52625.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: fix typo for default size</title>
<updated>2015-11-18T01:18:30+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-18T01:18:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=ca5f5871e8f54c76e804fb179e32a2ffa6fda4dc'/>
<id>ca5f5871e8f54c76e804fb179e32a2ffa6fda4dc</id>
<content type='text'>
* ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as
  default size to match pre-r52610, which also maps to a common
  page size.

Oops; absolutely no idea why I made this typo...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as
  default size to match pre-r52610, which also maps to a common
  page size.

Oops; absolutely no idea why I made this typo...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: fix recvmsg without argument</title>
<updated>2015-11-17T22:00:23+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-17T22:00:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=508b5fdd522ef9edba7a06ef18e3f8fcad866b71'/>
<id>508b5fdd522ef9edba7a06ef18e3f8fcad866b71</id>
<content type='text'>
* ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer
  on unspecified maxdatlen
  [ruby-core:71517] [Bug #11701]
* ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen
  (Socket#recvmsg_nonblock): ditto
* test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer
  on unspecified maxdatlen
  [ruby-core:71517] [Bug #11701]
* ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen
  (Socket#recvmsg_nonblock): ditto
* test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/socket/lib/socket.rb (Socket#recvmsg{,_nonblock}): default values</title>
<updated>2015-11-17T05:06:18+00:00</updated>
<author>
<name>usa</name>
<email>usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-17T05:06:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=66e2139b1a668681e63422cff57ddc2c36859b94'/>
<id>66e2139b1a668681e63422cff57ddc2c36859b94</id>
<content type='text'>
  of clen must be nil.

* ext/socket/ancdata.c (bsock_sendmsg_internal): handle nil of clen.
  fixes test errors introduced at r52602.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  of clen must be nil.

* ext/socket/ancdata.c (bsock_sendmsg_internal): handle nil of clen.
  fixes test errors introduced at r52602.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: avoid arg parsing in bsock_sendmsg_internal</title>
<updated>2015-11-17T01:05:30+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-11-17T01:05:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby.git/commit/?id=eda2441b5354829bea9225a99e0b96f0ba40b7ab'/>
<id>eda2441b5354829bea9225a99e0b96f0ba40b7ab</id>
<content type='text'>
* ext/socket/ancdata.c (bsock_sendmsg_internal): avoid arg parsing
  [ruby-core:71439] [Feature #11339]
  (rsock_bsock_sendmsg): make private, adjust for above
  (rsock_bsock_sendmsg_nonblock): ditto
* ext/socket/rubysocket.h: adjust prototypes
  (rsock_opt_false_p): remove
* ext/socket/basicsocket.c (rsock_init_basicsocket):
  define private methods
* ext/socket/lib/socket.rb (BasicSocket#sendmsg): new wrapper
  (BasicSocket#sendmsg_nonblock): ditto

target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux])
target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux]

-----------------------------------------------------------
sendmsg_nonblock

require 'socket'
nr = 1_000_000
i = 0
msg = '.'
buf = '.'
begin
  r, w = UNIXSocket.pair(:SEQPACKET)
  while i &lt; nr
    i += 1
    w.sendmsg_nonblock(msg, exception: false)
    r.recv(1, 0, buf)
  end
ensure
  r.close
  w.close
end

-----------------------------------------------------------
raw data:

[["sendmsg_nonblock",
  [[1.875997293740511,
    1.8452614955604076,
    1.8449317328631878,
    1.8418389447033405,
    1.869386937469244],
   [1.5175109766423702,
    1.4987873211503029,
    1.4989623799920082,
    1.47918451577425,
    1.5017359890043736]]]]

Elapsed time: 16.775453245 (sec)
-----------------------------------------------------------
benchmark results:
minimum results in each 5 measurements.
Execution time (sec)
name             a       b
sendmsg_nonblock   1.842   1.479

Speedup ratio: compare with the result of `a' (greater is better)
name             b
sendmsg_nonblock   1.245

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ext/socket/ancdata.c (bsock_sendmsg_internal): avoid arg parsing
  [ruby-core:71439] [Feature #11339]
  (rsock_bsock_sendmsg): make private, adjust for above
  (rsock_bsock_sendmsg_nonblock): ditto
* ext/socket/rubysocket.h: adjust prototypes
  (rsock_opt_false_p): remove
* ext/socket/basicsocket.c (rsock_init_basicsocket):
  define private methods
* ext/socket/lib/socket.rb (BasicSocket#sendmsg): new wrapper
  (BasicSocket#sendmsg_nonblock): ditto

target 0: a (ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux])
target 1: b (ruby 2.3.0dev (2015-11-12 avoid-kwarg-capi 52550) [x86_64-linux]

-----------------------------------------------------------
sendmsg_nonblock

require 'socket'
nr = 1_000_000
i = 0
msg = '.'
buf = '.'
begin
  r, w = UNIXSocket.pair(:SEQPACKET)
  while i &lt; nr
    i += 1
    w.sendmsg_nonblock(msg, exception: false)
    r.recv(1, 0, buf)
  end
ensure
  r.close
  w.close
end

-----------------------------------------------------------
raw data:

[["sendmsg_nonblock",
  [[1.875997293740511,
    1.8452614955604076,
    1.8449317328631878,
    1.8418389447033405,
    1.869386937469244],
   [1.5175109766423702,
    1.4987873211503029,
    1.4989623799920082,
    1.47918451577425,
    1.5017359890043736]]]]

Elapsed time: 16.775453245 (sec)
-----------------------------------------------------------
benchmark results:
minimum results in each 5 measurements.
Execution time (sec)
name             a       b
sendmsg_nonblock   1.842   1.479

Speedup ratio: compare with the result of `a' (greater is better)
name             b
sendmsg_nonblock   1.245

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
