<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/socket/rubysocket.h, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) d77e02bd85ab7f841df8d473bac214b9a92a3506: [Backport #21497]</title>
<updated>2025-07-20T06:49:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-07-20T06:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1e37f34eaad715119d49c13e0bf6e6c54c5cbca6'/>
<id>1e37f34eaad715119d49c13e0bf6e6c54c5cbca6</id>
<content type='text'>
	[Bug #21497] [ruby/socket]: add full prototype
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	otherwise, gcc 15 will complain:

	&gt; init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3
	&gt;   573 |     return (VALUE)Rconnect(arg-&gt;fd, arg-&gt;sockaddr, arg-&gt;len);
	&gt;       |                   ^~~~~~~~ ~~~~~~~
	&gt; In file included from init.c:11:
	&gt; rubysocket.h:294:5: note: declared here
	&gt;   294 | int Rconnect();
	&gt;       |     ^~~~~~~~

	&gt; sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1
	&gt;    33 |         SOCKSinit("ruby");
	&gt;       |         ^~~~~~~~~ ~~~~~~
	&gt; In file included from sockssocket.c:11:
	&gt; rubysocket.h:293:6: note: declared here
	&gt;   293 | void SOCKSinit();
	&gt;       |      ^~~~~~~~~

	Signed-off-by: Z. Liu &lt;zhixu.liu@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21497] [ruby/socket]: add full prototype
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	otherwise, gcc 15 will complain:

	&gt; init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3
	&gt;   573 |     return (VALUE)Rconnect(arg-&gt;fd, arg-&gt;sockaddr, arg-&gt;len);
	&gt;       |                   ^~~~~~~~ ~~~~~~~
	&gt; In file included from init.c:11:
	&gt; rubysocket.h:294:5: note: declared here
	&gt;   294 | int Rconnect();
	&gt;       |     ^~~~~~~~

	&gt; sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1
	&gt;    33 |         SOCKSinit("ruby");
	&gt;       |         ^~~~~~~~~ ~~~~~~
	&gt; In file included from sockssocket.c:11:
	&gt; rubysocket.h:293:6: note: declared here
	&gt;   293 | void SOCKSinit();
	&gt;       |      ^~~~~~~~~

	Signed-off-by: Z. Liu &lt;zhixu.liu@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename rsock_raise_socket_error to rsock_raise_resolution_error</title>
<updated>2023-11-30T04:27:19+00:00</updated>
<author>
<name>Misaki Shioi</name>
<email>shioi.mm@gmail.com</email>
</author>
<published>2023-11-23T07:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f62b1d00ce8ca56ad624963ebdf01c572e73efc'/>
<id>5f62b1d00ce8ca56ad624963ebdf01c572e73efc</id>
<content type='text'>
Again, rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Again, rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Socket::ResolutionError &amp; Socket::ResolutionError#error_code</title>
<updated>2023-11-30T04:27:19+00:00</updated>
<author>
<name>Misaki Shioi</name>
<email>shioi.mm@gmail.com</email>
</author>
<published>2023-11-23T07:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e9050270d7d8b1bc6be2c1352772b906031adc6e'/>
<id>e9050270d7d8b1bc6be2c1352772b906031adc6e</id>
<content type='text'>
Socket::ResolutionError#error_code returns Socket::EAI_XXX
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Socket::ResolutionError#error_code returns Socket::EAI_XXX
</pre>
</div>
</content>
</entry>
<entry>
<title>BasicSocket#recv* return `nil` rather than an empty packet</title>
<updated>2023-08-30T08:07:18+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-09-20T14:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bcc905100f1079e191632cfd02319c10af82dac0'/>
<id>bcc905100f1079e191632cfd02319c10af82dac0</id>
<content type='text'>
[Bug #19012]

man recvmsg(2) states:

&gt; Return Value
&gt; These calls return the number of bytes received, or -1 if an error occurred.
&gt; The return value will be 0 when the peer has performed an orderly shutdown.

Not too sure how one is supposed to make the difference between a packet of
size 0 and a closed connection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #19012]

man recvmsg(2) states:

&gt; Return Value
&gt; These calls return the number of bytes received, or -1 if an error occurred.
&gt; The return value will be 0 when the peer has performed an orderly shutdown.

Not too sure how one is supposed to make the difference between a packet of
size 0 and a closed connection.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for `sockaddr_un` on Windows. (#6513)</title>
<updated>2022-11-17T22:50:25+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-11-17T22:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda'/>
<id>ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda</id>
<content type='text'>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Expand tabs [ci skip]</title>
<updated>2022-07-21T16:42:04+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-07-21T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b21e94bebed90180d8ff63dad03b8b948361089'/>
<id>5b21e94bebed90180d8ff63dad03b8b948361089</id>
<content type='text'>
[Misc #18891]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Misc #18891]
</pre>
</div>
</content>
</entry>
<entry>
<title>Deprecate and rework old (fd) centric functions.</title>
<updated>2021-06-22T10:48:57+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2021-06-19T01:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=45e65f302b663b2c6ab69df06d3b6f219c1797b2'/>
<id>45e65f302b663b2c6ab69df06d3b6f219c1797b2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Direct io for accept, send, sendmsg, recvfrom, and related methods.</title>
<updated>2021-06-22T10:17:53+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2021-05-08T12:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3deb5d7113e1fd6e4b468e09464d524d390d811e'/>
<id>3deb5d7113e1fd6e4b468e09464d524d390d811e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)</title>
<updated>2021-06-14T04:21:08+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2021-06-14T04:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2792acc8f29c6ee1d04b57b7b70d43519a0ceda8'/>
<id>2792acc8f29c6ee1d04b57b7b70d43519a0ceda8</id>
<content type='text'>
Co-authored-by: Bruno Sutic &lt;code@brunosutic.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Bruno Sutic &lt;code@brunosutic.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Add connect_timeout to TCPSocket</title>
<updated>2020-12-10T11:52:29+00:00</updated>
<author>
<name>Masaki Matsushita</name>
<email>glass.saga@gmail.com</email>
</author>
<published>2020-09-25T07:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=78f188524f551c97b1a7a44ae13514729f1a21c7'/>
<id>78f188524f551c97b1a7a44ae13514729f1a21c7</id>
<content type='text'>
Add connect_timeout to TCPSocket.new in the same way as Socket.tcp.

Closes [Feature #17187]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add connect_timeout to TCPSocket.new in the same way as Socket.tcp.

Closes [Feature #17187]
</pre>
</div>
</content>
</entry>
</feed>
