NWUDPSocket
public class NWUDPSocket: NSObject
The wrapper for NWUDPSession.
Note
This class is thread-safe.-
The delegate instance.
Declaration
Swift
public weak var delegate: NWUDPSocketDelegate?
-
The time when the last activity happens.
Since UDP do not have a
close
semantic, this can be an indicator of timeout.Declaration
Swift
public var lastActive: Date = Date()
-
Create a new UDP socket connecting to remote.
Declaration
Swift
public init?(host: String, port: Int, timeout: Int = Opt.UDPSocketActiveTimeout)
Parameters
host
The host.
port
The port.
-
Send data to remote.
Declaration
Swift
public func write(data: Data)
Parameters
data
The data to send.
-
Undocumented
Declaration
Swift
public class NWUDPSocket: NSObject
-
Undocumented
Declaration
Swift
public class NWUDPSocket: NSObject
-
Undocumented
Declaration
Swift
public class NWUDPSocket: NSObject