Sock.Protocol Property

Top  Previous  Next

 

Function:

For the currently selected socket (selection is made through sock.num) selects the transport protocol.

Type:

Enum (pl_sock_protocol, byte)

Value Range:

0- PL_SOCK_PROTOCOL_UDP (default): UDP transport protocol.

1- PL_SOCK_PROTOCOL_TCP: TCP transport protocol.

See Also:

---

 


Details

Notice, that there is no "HTTP" selection, as HTTP is not a transport protocol (TCP is the transport protocol required by the HTTP). You make the socket accept HTTP connections by specifying the list of HTTP listening ports using the sock.httpportlist property or using the sock.httpmode property.

The program won't be able to change the value of this property when the socket is not idle (sock.statesimple<> 0- PL_SSTS_CLOSED).