Forum: Ruby-core [ruby-trunk - Feature #8042][Open] Add Addrinfo#socket to create a socket that is not connected or b

Posted by drbrain (Eric Hodel) (Guest)
on 2013-03-08 00:37
(Received via mailing list)
Issue #8042 has been reported by drbrain (Eric Hodel).

----------------------------------------
Feature #8042: Add Addrinfo#socket to create a socket that is not 
connected or bound
https://bugs.ruby-lang.org/issues/8042

Author: drbrain (Eric Hodel)
Status: Open
Priority: Normal
Assignee:
Category: ext
Target version: current: 2.1.0


This adds a socket method to Addrinfo to get a socket that has not been 
bound or connected to any address for connectionless operation.
Posted by Tanaka Akira (Guest)
on 2013-03-08 08:59
(Received via mailing list)
2013/3/8 drbrain (Eric Hodel) <drbrain@segment7.net>:

> Feature #8042: Add Addrinfo#socket to create a socket that is not connected or 
bound
> https://bugs.ruby-lang.org/issues/8042

> This adds a socket method to Addrinfo to get a socket that has not been bound or 
connected to any address for connectionless operation.

I think the method name, Addrinfo#socket, is too generic.

I feel that Addrinfo#socket method uses socket address in Addrinfo 
object,
but this proposal doesn't.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-03-11 02:32
(Received via mailing list)
Issue #8042 has been updated by drbrain (Eric Hodel).


How about unbound_socket?

I would like to use a feature like this one in rinda/ring.rb for 
multicast support since options need to be set before connect/bind (see 
#8073)

Perhaps #connect_to or #bind could take a block that would yield the 
socket for setsockopt before bind/connect?
----------------------------------------
Feature #8042: Add Addrinfo#socket to create a socket that is not 
connected or bound
https://bugs.ruby-lang.org/issues/8042#change-37481

Author: drbrain (Eric Hodel)
Status: Open
Priority: Normal
Assignee:
Category: ext
Target version: current: 2.1.0


This adds a socket method to Addrinfo to get a socket that has not been 
bound or connected to any address for connectionless operation.
Posted by Tanaka Akira (Guest)
on 2013-03-11 03:15
(Received via mailing list)
2013/3/11 drbrain (Eric Hodel) <drbrain@segment7.net>:
>
> How about unbound_socket?

I like unbound_socket.

> Perhaps #connect_to or #bind could take a block that would yield the socket for 
setsockopt before bind/connect?

It conflicts with current block usage of Addrinfo#connect_to and 
Addrinfo#bind.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-03-11 18:19
(Received via mailing list)
Issue #8042 has been updated by drbrain (Eric Hodel).

File addrinfo.socket.2.patch added

Here is an updated patch using #unbound_socket, may I commit?

PS: ext/socket has no listed maintainer, should it be you, Akira-san?
----------------------------------------
Feature #8042: Add Addrinfo#socket to create a socket that is not 
connected or bound
https://bugs.ruby-lang.org/issues/8042#change-37514

Author: drbrain (Eric Hodel)
Status: Open
Priority: Normal
Assignee:
Category: ext
Target version: current: 2.1.0


This adds a socket method to Addrinfo to get a socket that has not been 
bound or connected to any address for connectionless operation.
Posted by Tanaka Akira (Guest)
on 2013-03-12 00:32
(Received via mailing list)
2013/3/12 drbrain (Eric Hodel) <drbrain@segment7.net>:

> PS: ext/socket has no listed maintainer, should it be you, Akira-san?

When I want to change API, I tried to obtain approval by matz.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.