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

How to find out if address is in use  RSS feed

 
C Munro
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program creates a UDP connection to a specific port.
If this object however is called again, I would like to be able to check whether a UDP socket has already been established. I can't check (if socket == null) since this would be a new object and of course the socket would be null.
IS there a command to see if hte local host is in use already?
Thanks,
 
Ravi Verma
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by C Munro:
My program creates a UDP connection to a specific port.
If this object however is called again, I would like to be able to check whether a UDP socket has already been established. I can't check (if socket == null) since this would be a new object and of course the socket would be null.
IS there a command to see if hte local host is in use already?
Try This at command prompt->netstat -a
Gives u all the live connections including tcp/udp
Thanks,

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