How PocketSocket components work together
masterPocketSocket is composed of three main layers that allow for different levels of networking control:
PSWebSocketDriver: The core, networkless engine. It handles the WebSocket protocol logic (handshakes, framing, and parsing) by converting raw bytes into events and vice versa. It is ideal for 'Bring your own' networking scenarios.PSWebSocket: A networking-based client implementation. It wrapsNSInputStreamandNSOutputStreamto manage connection maintenance and usesPSWebSocketDriverinternally.PSWebSocketServer: A networking-based server implementation built aroundCFSocket. It listens for incoming connections and creates a uniquePSWebSocketinstance for every successful handshake.