---
title: "CFMachPortIsValid(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfmachportisvalid(_:)"
---

# CFMachPortIsValid(_:)

Returns a Boolean value that indicates whether a CFMachPort object is valid and able to receive messages.

## Declaration

```swift
func CFMachPortIsValid(_ port: CFMachPort!) -> Bool
```

## Parameters

- `port`: The CFMachPort object to examine.

## Return Value

Return Value true if port can be used for communication, otherwise false.

## See Also

### Examining a CFMachPort Object

- [CFMachPortGetContext(_:_:)](corefoundation/cfmachportgetcontext(_:_:).md)
- [CFMachPortGetInvalidationCallBack(_:)](corefoundation/cfmachportgetinvalidationcallback(_:).md)
- [CFMachPortGetPort(_:)](corefoundation/cfmachportgetport(_:).md)
