title: Developing IP messenger in VB.Net
body: <p>I want to develop a Ip messenger app in VB.Net for all the user connected in LAN. 
  I am able to send message to user according to IP Address.</p>
  
  <p>I want a functionality to list all the user which are connected(Using) to this app so that they can receive message.</p>
  
  <p>How to check whether the person at other location is connected to the app or not.</p>
  
  <p>I first used System.Net.NetworkInformation.Ping and PingReply to get whether user is available or not.</p>
  
  <p>Without checking if i start sending message to a location which is not in use then Socket Exception is thrown when I try run connect user at particular port.</p>
  
  <pre><code>            Dim tcpClient As New TcpClient(ip, 2828)
  </code></pre>
  
  <p>Also error is returned after delay if I write this code in try catch block. Is there any quick way to check whether there is a listener at a particular given port?</p>