<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/streams-sockets-and-ports",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Streams, Sockets, and Ports"
}
-->

# Streams, Sockets, and Ports

Use low-level Unix features to manage input and output among files, processes, and the network.

## Topics

### Streams

[`Stream`](/documentation/Foundation/Stream)

An abstract class representing a stream.

[`InputStream`](/documentation/Foundation/InputStream)

A stream that provides read-only stream functionality.

[`OutputStream`](/documentation/Foundation/OutputStream)

A stream that provides write-only stream functionality.

[`StreamDelegate`](/documentation/Foundation/StreamDelegate)

An interface that delegates of a stream instance use to handle events on the stream.

### Tasks and Pipes

[`Process`](/documentation/Foundation/Process)

An object that represents a subprocess of the current process.

[`Pipe`](/documentation/Foundation/Pipe)

A one-way communications channel between related processes.

### Sockets

[`Host`](/documentation/Foundation/Host)

A representation of an individual host on the network.

[`Port`](/documentation/Foundation/Port)

An abstract class that represents a communication channel.

[`SocketPort`](/documentation/Foundation/SocketPort)

A port that represents a BSD socket.

### Byte Ordering

[Byte Order Utilities](/documentation/Foundation/byte-order-utilities)

Examine and manage the byte order of numbers communicated through network channels.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)