ClassesClassesClassesClasses | | | | Operators

set_socket_paramset_socket_paramSetSocketParamset_socket_paramSetSocketParamSetSocketParam (Operator)

Name

set_socket_paramset_socket_paramSetSocketParamset_socket_paramSetSocketParamSetSocketParam — Set a socket parameter.

Signature

set_socket_param( : : Socket, GenParamName, GenParamValue : )

Herror set_socket_param(const Hlong Socket, const char* GenParamName, const char* GenParamValue)

Herror T_set_socket_param(const Htuple Socket, const Htuple GenParamName, const Htuple GenParamValue)

Herror set_socket_param(const HTuple& Socket, const HTuple& GenParamName, const HTuple& GenParamValue)

void HSocket::SetSocketParam(const HTuple& GenParamName, const HTuple& GenParamValue) const

void SetSocketParam(const HTuple& Socket, const HTuple& GenParamName, const HTuple& GenParamValue)

void HSocket::SetSocketParam(const HTuple& GenParamName, const HTuple& GenParamValue) const

void HSocket::SetSocketParam(const HString& GenParamName, const HString& GenParamValue) const

void HSocket::SetSocketParam(const char* GenParamName, const char* GenParamValue) const

void HOperatorSetX.SetSocketParam(
[in] VARIANT Socket, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

void HSocketX.SetSocketParam(
[in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.SetSocketParam(HTuple socket, HTuple genParamName, HTuple genParamValue)

void HSocket.SetSocketParam(HTuple genParamName, HTuple genParamValue)

void HSocket.SetSocketParam(string genParamName, string genParamValue)

Description

set_socket_paramset_socket_paramSetSocketParamset_socket_paramSetSocketParamSetSocketParam sets the GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName according to GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue for the specified socket connection. Available parameters are 'timeout'"timeout""timeout""timeout""timeout""timeout", 'SO_SNDBUF'"SO_SNDBUF""SO_SNDBUF""SO_SNDBUF""SO_SNDBUF""SO_SNDBUF", 'SO_RCVBUF'"SO_RCVBUF""SO_RCVBUF""SO_RCVBUF""SO_RCVBUF""SO_RCVBUF", 'SO_BROADCAST'"SO_BROADCAST""SO_BROADCAST""SO_BROADCAST""SO_BROADCAST""SO_BROADCAST", and 'TCP_NODELAY'"TCP_NODELAY""TCP_NODELAY""TCP_NODELAY""TCP_NODELAY""TCP_NODELAY".

The parameter 'timeout'"timeout""timeout""timeout""timeout""timeout" can be used to set a timeout for this socket. The timeout is given in seconds as a floating point number or as the string 'infinite'"infinite""infinite""infinite""infinite""infinite".

The parameters starting with 'SO_' or 'TCP_' set the corresponding socket options. 'SO_SNDBUF'"SO_SNDBUF""SO_SNDBUF""SO_SNDBUF""SO_SNDBUF""SO_SNDBUF" and 'SO_RCVBUF'"SO_RCVBUF""SO_RCVBUF""SO_RCVBUF""SO_RCVBUF""SO_RCVBUF" specify the size of the send respectively receive buffer of the operating system for this socket. Please be aware that this does not mean the size of one network packet but the size of the buffers where all packets are temporarily stored by your operating system. 'SO_BROADCAST'"SO_BROADCAST""SO_BROADCAST""SO_BROADCAST""SO_BROADCAST""SO_BROADCAST" can only be used together with UDP connections and enables broadcasting of network packets. 'TCP_NODELAY'"TCP_NODELAY""TCP_NODELAY""TCP_NODELAY""TCP_NODELAY""TCP_NODELAY" controls the Nagle algorithm, which optimizes the flow of small TCP packets and can only be used with TCP connections.

Parallelization

Parameters

SocketSocketSocketSocketSocketsocket (input_control)  socket_id HSocket, HTupleHTupleHSocket, HTupleHSocketX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Socket number.

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Name of the socket parameter.

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

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)

Value of the socket parameter.

Default value: 'on' "on" "on" "on" "on" "on"

Suggested values: 'on'"on""on""on""on""on", 'off'"off""off""off""off""off", 0, 1, 3.0, 'infinite'"infinite""infinite""infinite""infinite""infinite", 530, 1460

Possible Predecessors

open_socket_connectopen_socket_connectOpenSocketConnectopen_socket_connectOpenSocketConnectOpenSocketConnect, socket_accept_connectsocket_accept_connectSocketAcceptConnectsocket_accept_connectSocketAcceptConnectSocketAcceptConnect

Possible Successors

send_datasend_dataSendDatasend_dataSendDataSendData, receive_datareceive_dataReceiveDatareceive_dataReceiveDataReceiveData

See also

get_socket_paramget_socket_paramGetSocketParamget_socket_paramGetSocketParamGetSocketParam

Module

Foundation


ClassesClassesClassesClasses | | | | Operators