Skip to content

Acceptor host and port#42

Open
iconara wants to merge 3 commits into
masterfrom
acceptor-host-and-port
Open

Acceptor host and port#42
iconara wants to merge 3 commits into
masterfrom
acceptor-host-and-port

Conversation

@iconara

@iconara iconara commented Apr 28, 2016

Copy link
Copy Markdown
Owner

Add #host and #port to Ione::Io::Acceptor so that you can find out the host and port that the server runs on when you specify '0.0.0.0' and/or 0 as host and port.

These values are now also the default values so that you can do reactor.bind to start a server that listens to any interface and an available port.

iconara added 3 commits April 29, 2016 08:37
This is useful when you want to bind to any available port.

Also make IoReactor#bind default to 0.0.0.0 and 0 so that binding without parameters binds to any available port on any interface. Since you now can easily determine which this is there's no reason to require the parameters.
So that you can figure out which interface and port the connection is using.
@iconara iconara force-pushed the acceptor-host-and-port branch from 395d54e to f63e459 Compare April 29, 2016 06:37
@coveralls

coveralls commented Apr 29, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.4%) to 98.783% when pulling f63e459 on acceptor-host-and-port into fe3fdd2 on master.

@iconara

iconara commented May 10, 2016

Copy link
Copy Markdown
Owner Author

The SSL part doesn't work.

Also there's a bug in JRuby 1.7.x where Addrinfo#ip_unpack returns the wrong thing for IPv6 addresses.

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