Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Query Socket for Remote IP Address and Port
This is not a full example, but only a code fragment. It shows how the RemoteIpAddress and RemotePort properties are used to access the remote IP address and port for a connected socket. ...
' Make a synchronous call to accept the next incoming connection.
Dim socket2 As ChilkatSocket
Set socket2 = socket.AcceptNextConnection(maxWaitMs)
If socket2 Is Nothing Then
MsgBox socket.LastErrorText
Exit Sub
End If
' Who connected to us?
' Show the remote IP address and port.
Dim RemoteIP As String
Dim RemotePort As Integer
RemoteIP = socket2.RemoteIpAddress
RemotePort = socket2.RemotePort
MsgBox "Connected to " & RemoteIP & ":" & Str(RemotePort)
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.