TSTCPSocketDelegate
public protocol TSTCPSocketDelegate : AnyObject
The delegate that developer should implement to handle various TCP events.
-
The socket is closed on tx side (FIN received). We will not read any data.
Declaration
Swift
func localDidClose(_ socket: TSTCPSocket) -
The socket is reseted (RST received), it should be released immediately.
Declaration
Swift
func socketDidReset(_ socket: TSTCPSocket) -
The socket is aborted (RST sent), it should be released immediately.
Declaration
Swift
func socketDidAbort(_ socket: TSTCPSocket) -
The socket is closed. This will only be triggered if the socket is closed actively by calling
close(). It should be released immediately.Declaration
Swift
func socketDidClose(_ socket: TSTCPSocket) -
Socket read data from local tx side.
Declaration
Swift
func didReadData(_ data: Data, from: TSTCPSocket)Parameters
dataThe read data.
fromThe socket object.
-
The socket has sent the specific length of data.
Declaration
Swift
func didWriteData(_ length: Int, from: TSTCPSocket)Parameters
lengthThe length of data being ACKed.
fromThe socket.
View on GitHub
TSTCPSocketDelegate Protocol Reference