Classes
The following classes are available globally.
-
This is the IP stack that receives and outputs IP packets.
outputBlock
anddelegate
should be set before any input. Then callreceivedPacket(_:)
when a new IP packet is read from the TUN interface.There is a timer running internally. When the device is going to sleep (which means the timer will not fire for some time), then the timer must be paused by calling
suspendTimer()
and resumed byresumeTimer()
when the deivce wakes up.Note
This class is NOT thread-safe.Declaration
Swift
public final class TSIPStack
-
The TCP socket class.
Note
Unless one ofsocketDidReset(_:)
,socketDidAbort(_:)
orsocketDidClose(_:)
delegation methods is called, please doclose()
the socket actively and wait forsocketDidClose(_:)
before releasing it.Note
This class is NOT thread-safe, make sure every method call is on the same dispatch queue asTSIPStack
.Declaration
Swift
public final class TSTCPSocket