Tunnel
public class Tunnel: NSObject, SocketDelegate
The tunnel forwards data between local and remote.
-
The proxy socket.
Declaration
Swift
var proxySocket: ProxySocket
-
The adapter socket connecting to remote.
Declaration
Swift
var adapterSocket: AdapterSocket?
-
The delegate instance.
Declaration
Swift
weak var delegate: TunnelDelegate?
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
If the tunnel is closed, i.e., proxy socket and adapter socket are both disconnected.
Declaration
Swift
var isClosed: Bool
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
Undocumented
Declaration
Swift
public class Tunnel: NSObject, SocketDelegate
-
Start running the tunnel.
Declaration
Swift
func openTunnel()
-
Close the tunnel elegantly.
Declaration
Swift
func close()
-
Close the tunnel immediately.
Note
This method is thread-safe.Declaration
Swift
func forceClose()
-
Declaration
Swift
public func didReceive(session: ConnectSession, from: ProxySocket)
Parameters
session
from
-
Declaration
Swift
public func didBecomeReadyToForwardWith(socket: SocketProtocol)
Parameters
socket
-
Declaration
Swift
public func didDisconnectWith(socket: SocketProtocol)
Parameters
socket
-
Declaration
Swift
public func didRead(data: Data, from socket: SocketProtocol)
Parameters
data
from
-
Declaration
Swift
public func didWrite(data: Data?, by socket: SocketProtocol)
Parameters
data
by
-
Declaration
Swift
public func didConnectWith(adapterSocket: AdapterSocket)
Parameters
adapterSocket
-
Declaration
Swift
public func updateAdapterWith(newAdapter: AdapterSocket)
Parameters
newAdapter