CFMessagePort Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides local interprocess communication through named message ports.
public class CFMessagePort : CoreFoundation.NativeObject
type CFMessagePort = class
inherit NativeObject
- Inheritance
Remarks
Create a local port with CreateLocalPort(String, CFMessagePort+CFMessagePortCallBack, CFAllocator) to receive messages, and create a remote port with CreateRemotePort(CFAllocator, String) to send messages to a named local port.
A local port must be scheduled by calling CreateRunLoopSource() and adding the returned source to a run loop, or by calling SetDispatchQueue(DispatchQueue).
Properties
| Name | Description |
|---|---|
| Handle | (Inherited from DisposableObject) |
| InvalidationCallback |
Gets or sets the callback invoked when the message port becomes invalid. |
| IsRemote |
Gets a value that indicates whether this instance represents a remote port. |
| IsValid |
Gets a value that indicates whether the port can send or receive messages. |
| Name |
Gets or sets the registered name of the message port. |
| Owns | (Inherited from DisposableObject) |
Methods
| Name | Description |
|---|---|
| ClearHandle() | (Inherited from DisposableObject) |
| CreateLocalPort(String, CFMessagePort+CFMessagePortCallBack, CFAllocator) |
Creates a local message port that receives messages. |
| CreateRemotePort(CFAllocator, String) |
Creates a remote message port for sending messages to a named local port. |
| CreateRunLoopSource() |
Creates a run loop source that delivers messages to this local port. |
| Dispose() |
Releases all resources used by this object. (Inherited from DisposableObject) |
| Dispose(Boolean) |
Releases the resources used by the CFMessagePort object. |
| Dispose(Boolean) |
Releases the resources used by this object. (Inherited from NativeObject) |
| Equals(Object) | (Inherited from DisposableObject) |
| GetCheckedHandle() | (Inherited from DisposableObject) |
| GetHashCode() | (Inherited from DisposableObject) |
| InitializeHandle(NativeHandle) | (Inherited from DisposableObject) |
| Invalidate() |
Invalidates the message port so that it can no longer send or receive messages. |
| Release() | (Inherited from NativeObject) |
| Retain() | (Inherited from NativeObject) |
| SendRequest(Int32, NSData, Double, Double, NSString, NSData) |
Sends a message through a remote message port. |
| SetDispatchQueue(DispatchQueue) |
Schedules this local port's callbacks on a dispatch queue. |
| TrySetName(String) |
Attempts to change the registered name of this local message port. |
Extension Methods
| Name | Description |
|---|---|
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |