Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
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)
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.