Click or drag to resize

CSocket.getpeername Method

X#
Get the address of the peer to which the socket is connected.

Namespace:  VO
Assembly:  VOInternetClasses (in VOInternetClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD getpeername(
	cName REF STRING,
	nPort REF LONG
) AS LOGIC
Request Example View Source

Parameters

cName
Type: String
Reference to a string to receive the peer's IP address.
nPort
Type: Long
Reference to a DWORD value to receive the peer's port number.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
This method gets the address and port number of the peer to which the socket is connected.
Examples
See the CSocket:Accept() example.
See Also