# TCP Address binding /resolution

**URL:** <https://www.ruby-forum.com/t/tcp-address-binding-resolution/118285>\
**Category:** Ruby\
**Created:** [October 25, 2007, 11:58am UTC](https://www.ruby-forum.com/t/tcp-address-binding-resolution/118285 "2007-10-25T11:58:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ochomo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/45deac/32.png) [@ochomo](https://www.ruby-forum.com/u/ochomo)\
**Post date:** [October 25, 2007, 11:58am UTC](https://www.ruby-forum.com/t/tcp-address-binding-resolution/118285/1 "2007-10-25T11:58:49Z")

</div>

Hello,

I have a small ruby server application that uses code like this:

server = TCPServer.new(‘10.2.77.66’, 6060)

the problem is that I can only access it on browser if I use:

[http://10.2.77.66:6060](http://10.2.77.66:6060)

instead i want to access it also using: hostname, localhost, 127.0.0.1,  
…

is there a way I can instantiate the TCPServer to take care of all  
addresses?

–  
Ochomo

---

<div class="post-metadata">

**Author:** ![ochomo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/45deac/32.png) [@ochomo](https://www.ruby-forum.com/u/ochomo)\
**Post date:** [October 25, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/tcp-address-binding-resolution/118285/2 "2007-10-25T12:12:19Z")

</div>

Thanks,

It works.

Cheers

–  
Ochomo

Arlen Christian Mart C. wrote:

> Try 0.0.0.0.
> 
> Arlen

---

<div class="post-metadata">

**Author:** ![ochomo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/45deac/32.png) [@ochomo](https://www.ruby-forum.com/u/ochomo)\
**Post date:** [October 25, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/tcp-address-binding-resolution/118285/3 "2007-10-25T12:04:41Z")

</div>

Try 0.0.0.0.

Arlen
