SocketAttribs
(Engine-Level Function)
Description: | Returns information about a TCP/IP socket's attributes. |
Returns: | Text or Buffer (see comments) |
Usage: | Script Only. |
Function Groups: | Stream and Socket |
Related to: | ClientSocket | CloseStream | ServerSocket | SocketAttribs | SocketServerEnd | SocketServerStart | SocketWait | SRead | StreamEnd | SWrite | |
Format: | SocketAttribs(Stream, Option [,FilterID, Opcode , Data]) |
Parameters: |
Stream | ||||||||||||||||||||||||||||||||||||||||||
Required. Any stream expression for the socket. If this isn't a socket stream, invalid is returned. | ||||||||||||||||||||||||||||||||||||||||||
Option | ||||||||||||||||||||||||||||||||||||||||||
Required. Any numeric expression for the desired attribute:
|
||||||||||||||||||||||||||||||||||||||||||
FilterID | ||||||||||||||||||||||||||||||||||||||||||
Optional text. Set to "WSKT" for WebSockets. | ||||||||||||||||||||||||||||||||||||||||||
OpCode | ||||||||||||||||||||||||||||||||||||||||||
Optional numeric. Refer to the list in the comments. | ||||||||||||||||||||||||||||||||||||||||||
Data | ||||||||||||||||||||||||||||||||||||||||||
Optional text. Refer to the list in the comments. |
Comments: |
The return value for options 0 and 6 is the machine name stored as a text value. If the name cannot be found it will return the internet address of the socket as a text string. If using option 13 to activate optional filters, note that (as of VTScada version 12.1) TLS/SSL and WebSocket are the only ones supported. Option 19 provides control operations for protocol filters that support this: FilterID = "WSKT" Opcode == 0 (Activate). Opcode == 1 (Max Rx Time). Opcode == 2 (Ping time). Opcode == 3 (Close time). Opcode == 4 (Tx Max Frame Size). |