Instance Method

writeMultipleDatagrams(_:completionHandler:)

Write multiple datagrams

Declaration

func writeMultipleDatagrams(_ datagramArray: [Data], completionHandler: @escaping (Error?) -> Void)

Parameters

datagramArray

An NSArray of NSData objects, containing the ordered list of datagrams to write.

completionHandler

A handler called when the write request has either succeeded or failed.

Discussion

Callers should wait until the completionHandler is executed before issuing another write.

See Also

Transferring Data

var maximumDatagramLength: Int

The maximum size of a datagram to be written currently