CFMessagePortSendRequest(_:_:_:_:_:_:_:)
Sends a message to a remote CFMessagePort object.
Declaration
func CFMessagePortSendRequest(_ remote: CFMessagePort!, _ msgid: Int32, _ data: CFData!, _ sendTimeout: CFTimeInterval, _ rcvTimeout: CFTimeInterval, _ replyMode: CFString!, _ returnData: UnsafeMutablePointer<Unmanaged<CFData>?>!) -> Int32Parameters
- remote:
The message port to which
datashould be sent. - msgid:
An arbitrary integer value that you can send with the message.
- data:
The data to send to
remote. - sendTimeout:
The time to wait for
datato be sent. - rcvTimeout:
The time to wait for a reply to be returned.
- replyMode:
The run loop mode in which the function should wait for a reply. If the message is a
oneway(so no response is expected), thenreplyModeshould beNULL. IfreplyModeis non-NULL, the function runs the run loop waiting for a reply, in that mode.replyModecan be any string name of a run loop mode, but it should be one with input sources installed. You should use thekCFRunLoopDefaultModeconstant unless you have a specific reason to use a different mode. - returnData:
Upon return, contains a CFData object containing the reply data. Ownership follows the 20001148 103029.
Return Value
Error code indicating success or failure. See CFMessagePortSendRequest Error Codes for the possible return values.