---
title: "send(before:msgid:components:from:reserved:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/port/send(before:msgid:components:from:reserved:)"
---

# send(before:msgid:components:from:reserved:)

This method is provided for subclasses that have custom types of NSPort.

## Declaration

```swift
func send(before limitDate: Date, msgid msgID: Int, components: NSMutableArray?, from receivePort: Port?, reserved headerSpaceReserved: Int) -> Bool
```

## Parameters

- `limitDate`: The last instant that a message may be sent.
- `msgID`: The message ID.
- `components`: The message components.
- `receivePort`: The receive port.
- `headerSpaceReserved`: The number of bytes reserved for the header.

## Discussion

Discussion NSConnection calls this method at the appropriate times. This method should not be called directly. This method could raise an NSInvalidSendPortException, NSInvalidReceivePortException, or an NSPortSendException, depending on the type of send port and the type of error.

## See Also

### Setting information

- [send(before:components:from:reserved:)](foundation/port/send(before:components:from:reserved:).md)
- [reservedSpaceLength](foundation/port/reservedspacelength.md)
