Skip to content

get_socket_paramGetSocketParamGetSocketParamget_socket_paramT_get_socket_param🔗

Short description🔗

get_socket_paramGetSocketParamGetSocketParamget_socket_paramT_get_socket_param — Get the value of a socket parameter.

Signature🔗

get_socket_param( socket Socket, string GenParamName, out string GenParamValue )void GetSocketParam( const HTuple& Socket, const HTuple& GenParamName, HTuple* GenParamValue )static void HOperatorSet.GetSocketParam( HTuple socket, HTuple genParamName, out HTuple genParamValue )def get_socket_param( socket: HHandle, gen_param_name: MaybeSequence[str] ) -> Union[float, int, str]

Herror T_get_socket_param( const Htuple Socket, const Htuple GenParamName, Htuple* GenParamValue )

HTuple HSocket::GetSocketParam( const HTuple& GenParamName ) const

HTuple HSocket::GetSocketParam( const HString& GenParamName ) const

HTuple HSocket::GetSocketParam( const char* GenParamName ) const

HTuple HSocket::GetSocketParam( const wchar_t* GenParamName ) const (Windows only)

HTuple HSocket.GetSocketParam( HTuple genParamName )

HTuple HSocket.GetSocketParam( string genParamName )

Description🔗

get_socket_paramGetSocketParam reads the GenParamValuegenParamValuegen_param_value of the GenParamNamegenParamNamegen_param_name for the specified socket connection. Available parameters are 'timeout'"timeout", 'address_info'"address_info", 'SO_SNDBUF'"SO_SNDBUF", 'SO_RCVBUF'"SO_RCVBUF", 'SO_BROADCAST'"SO_BROADCAST", and 'TCP_NODELAY'"TCP_NODELAY".

The parameter 'address_info'"address_info" returns the IP address and port of the local and the remote side of the specified socket connection.

See set_socket_paramSetSocketParam for a description of the other values.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Socketsocketsocket (input_control) socket → (handle)HTuple (HHandle)HSocket, HTuple (IntPtr)HHandleHtuple (handle)

Socket number.

GenParamNamegenParamNamegen_param_name (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Name of the socket parameter.

List of values: 'SO_BROADCAST', 'SO_RCVBUF', 'SO_SNDBUF', 'TCP_NODELAY', 'address_info', 'timeout'"SO_BROADCAST", "SO_RCVBUF", "SO_SNDBUF", "TCP_NODELAY", "address_info", "timeout"

GenParamValuegenParamValuegen_param_value (output_control) string → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)Union[float, int, str]Htuple (char* / double / Hlong)

Value of the socket parameter.

Combinations with other operators🔗

Combinations

Possible predecessors

open_socket_connectOpenSocketConnect, socket_accept_connectSocketAcceptConnect

Possible successors

set_socket_paramSetSocketParam

See also

set_socket_paramSetSocketParam

Module🔗

Foundation