NetService
open class NetService : NSObject
extension NetService: NetServiceDelegate
extension NetService: Running
The NetService class creates a two-way connection between a client and a server as a server.
-
The TXT record for the receiver.
Declaration
Swift
open var txtData: Data? { get } -
The domain for the service.
Declaration
Swift
public let domain: String -
The network service type.
Declaration
Swift
public let type: String -
The name of service.
Declaration
Swift
public let name: String -
The port.
Declaration
Swift
public let port: Int32 -
The service is running or not.
Declaration
Swift
public private(set) var isRunning: Atomic<Bool> { get } -
The current connected client objects.
Declaration
Swift
public private(set) var clients: [NetClient] { get } -
Create a new NetService object.
Declaration
Swift
public init(domain: String, type: String, name: String, port: Int32)
-
Undocumented
Declaration
Swift
public func netService(_ sender: Foundation.NetService, didAcceptConnectionWith inputStream: InputStream, outputStream: OutputStream)
-
Declaration
Swift
public func startRunning() -
Declaration
Swift
public func stopRunning()