Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServerSocket address is 0.0.0.0 ???????  RSS feed

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm creating a ServerSocket but that's leading me into having a ServerSocket which its host name = 0.0.0.0

does anybody know why is that ?

is it that the port i'm using is closed or is being used by anoter app. ?

Any comments are welcomed.

Thanks in advance ...
 
Henry Wong
author
Sheriff
Posts: 23275
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm creating a ServerSocket but that's leading me into having a ServerSocket which its host name = 0.0.0.0

does anybody know why is that ?


It just means that the server socket is unbound. By default, when you create a server socket, it will accept connections from all your NICs. And since, each NIC has a different ip address (and hostname), it takes the name of "0.0.0.0" to mean that it is accepting connections from all of them.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!