MashaTelyatnikova / protobuf-socket-rpc

Automatically exported from code.google.com/p/protobuf-socket-rpc
MIT License
0 stars 0 forks source link

SocketRpcServer only accesible from localhost by default #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The default host arg to SocketRpcServer constructor is 'localhost'
I would expect the server to bind a socket to the computers localhost
127.0.0.1 address and for that socket to not be accesible from a remote
host.  However, I would expect that I should be able to but in the value of
retrieved via

import socket
socket.gethostbyname()

into the constructor and have it bind to the hosts external facing ip
address.  However what you get is still a binding to the 127.0.0.1 address
making the socket inaccessible from a remote host.

Apparently the way to get a binding to the external facing IP is to set the
host arg to the empty string.

I would suggest changing the default host arg to be the empty string ''
which seems to give the most intuitive behavior to the constructor when
called with only a port number arg

Original issue reported on code.google.com by walker.z...@gmail.com on 24 Sep 2009 at 10:11