Skip to main content

rt_getpeername

Description

Retrieves the address information of the remote peer associated with a connected RTTP socket.

Syntax:

int rt_getpeername(RTEngine engine, RTSOCKET s, struct sockaddr *name, int len);

Parameters:

engine: The pointer to the RTTP engine instance returned by rt_init().

s: The connected RTTP socket descriptor.

name: A pointer to the buffer used to store the remote address.

len: An input parameter specifying the maximum length of the name buffer.

Return Value:

Returns the length of the address copied into the name buffer on success; returns a negative error code on failure.