• Post Reply Bookmark Topic Watch Topic
  • New Topic

connection url doubt

 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is a server url of form {protocol}://:{port} equivalent to {protocol}://localhost:{port} , {protocol}://127.0.0.1:{port} ?
Or rather, are urls like {protocol}://localhost:{port} , {protocol}://127.0.0.1:{port} ever valid?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yi Meng:
is a server url of form {protocol}://:{port} equivalent to {protocol}://localhost:{port} , {protocol}://127.0.0.1:{port} ?
Or rather, are urls like {protocol}://localhost:{port} , {protocol}://127.0.0.1:{port} ever valid?

As far as I read throught the spec, I think that {protocol}://localhost:{port} and {protocol}://127.0.0.1:{port} will create client connection to the localhost itself, which cannot receive the message from anywhere...
The above connection will be client connection at localhost, while {protocol}://:{port} connection will be server connection at localhost, which can both send and receive the messages...
Hope it might be helpful for u... Any comments is welcome...
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!