You are here: MessengerYouLike.IMSDK > IMSDK Reference > IMSDK Namespace > Classes > IMClient Class > IMClient Events > IMClient.OnListening Event
MessengerYouLike
IMClient.OnListening Event

When IMClient Starts Listening by opening a port

C#
public event OnListening;
Visual Basic
Public Event OnListening(ByVal IP As Net.IPAddress, ByVal Port As Integer)
Return Values 
Description 
ByVal IP As Net.IPAddress 
IP Address of the Local IMClient 
ByVal Port As Integer 
Port on Which the IMClient Listens 

When a sub IMSDK.IMClient.Listen starts listening on a port then this event is fired the port value is based on the property IMSDK.IMClient.PortToListen

IMSDK.IMClient.Listen IMSDK.IMClient.PortToListen

 [Visual Basic]
 Private Sub MC_Listening(ByVal IP As System.Net.IPAddress, ByVal Port As Integer) Handles MC.OnListening
      Debug.WriteLine("listening now :IP :  " & IP.ToString & " : Port : " & Port.ToString)
 End Sub
Copyright (c) 2007. All rights reserved.