3.1.4.1 R_GetServerPort (Opnum 0)

The R_GetServerPort method returns the RPC endpoint port for the client to use in subsequent method calls on the RemoteRead interface.

The server MUST return the TCP port number for the RemoteRead RPC interface. The default port number used is 2103. If this port is already in use, the server SHOULD increment the port number by 11 until an unused port is found.

The client MAY call this method prior to calling any other method on the protocol. The client MAY use the returned value to obtain another RPC binding handle to use with the remaining methods on the protocol.<13>

 DWORD R_GetServerPort(
   [in] handle_t hBind
 );

hBind: MUST specify an RPC binding handle parameter, as specified in [MS-RPCE] section 2.

Return Values: On success, this method MUST return a nonzero TCP port value for the RPC interface. If an error occurs, the server MUST return 0x00000000.

Exceptions Thrown:

No exceptions are thrown except those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

As specified in section 3.1.3, this protocol configures a fixed listening endpoint at an RPC port number that can vary. This method returns the RPC port number determined at server initialization time.