ProxySocket

open class ProxySocket: NSObject, SocketProtocol, RawTCPSocketDelegate

The socket which encapsulates the logic to handle connection to proxies.

  • The socket did disconnect.

    Declaration

    Swift

    open func didDisconnectWith(socket: RawTCPSocketProtocol)

    Parameters

    socket

    The socket which did disconnect.

  • The socket did read some data.

    Declaration

    Swift

    open func didRead(data: Data, from: RawTCPSocketProtocol)

    Parameters

    data

    The data read from the socket.

    withTag

    The tag given when calling the readData method.

    from

    The socket where the data is read from.

  • The socket did send some data.

    Declaration

    Swift

    open func didWrite(data: Data?, by: RawTCPSocketProtocol)

    Parameters

    data

    The data which have been sent to remote (acknowledged). Note this may not be available since the data may be released to save memory.

    from

    The socket where the data is sent out.

  • The socket did connect to remote.

    Note

    This never happens for ProxySocket.

    Declaration

    Swift

    open func didConnectWith(socket: RawTCPSocketProtocol)

    Parameters

    socket

    The connected socket.