IPWorks WebSockets 2020 macOS Edition

Questions / Feedback?

WebSocketProxyConnection Type

A currently connected client.

Remarks

This type describes the connection of a client which is currently connected to the class. You may use the different fields of this type to manage the connection.

Fields

connected
Bool

This property is used to disconnect individual connections and/or show their status.

The Connected property may be set to false to close the connection.

Connected also shows the status of a particular connection (connected/disconnected).

connectionId
String

This property contains an identifier generated by the class to identify each connection. This identifier is unique to this connection.

forwardHost
String

This property shows the address of the forward host.

When queried this property will return the address of the host to which traffic is being forwarded.

If the class is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

forwardPort
Int32

This property shows the port of the forward host.

When queried this property will return the port of the host to which traffic is being forwarded.

host
String

The Host header value of the connected client.

localAddress
String

This property shows the IP address of the interface through which the connection is passing.

LocalAddress is important for multi-homed hosts where it can be used to find which particular network interface an individual connection is going through.

origin
String

The Origin header value of the connected client.

remoteHost
String

This property shows the IP address of the connected client.

The connection must be valid or an error will be fired.

If the class is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

remotePort
Int32

This property shows the port of the connected client.

The connection must be valid or an error will be fired.

requestHeaders
String

The HTTP headers sent by the client in the initial WebSocket connection request.

requestURI
String

The requested URI sent by the client in the initial WebSocket connection request.

subProtocols
String

The subprotocols (application-level protocols layered over the WebSocket Protocol) sent by the client in the initial WebSocket connection request.

timeout
Int32

This property specifies a timeout for the class.

If the Timeout property is set to 0, all operations return immediately, potentially failing with a WOULDBLOCK error if data cannot be sent immediately.

If Timeout is set to a positive value, data is sent in a blocking manner and the class will wait for the operation to complete before returning control. The class will handle any potential WOULDBLOCK errors internally and automatically retry the operation for a maximum of Timeout seconds.

The class will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the class .

Please note that by default, all timeouts are inactivity timeouts, i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

The default value for the Timeout property is 0 (asynchronous operation).

Constructors

public init()

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks WebSockets 2020 macOS Edition - Version 20.0 [Build 8155]