Starscream is a conforming WebSocket (RFC 6455) library in Swift. Once imported, you can open a connection to your WebSocket server. Note that socket is probably best as a property, so it doesn't get deallocated right after being setup. After you are connected, there is either a delegate or closure you can use for process WebSocket events. The writeData method gives you a simple way to send Data (binary) data to the server. The writeString method is the same as writeData, but sends text/string. The writePing method is the same as write, but sends a ping control frame. Starscream will automatically respond to incoming ping control frames so you do not need to manually send pongs. You can override the default websocket headers, add your own custom ones and set a timeout. Update docs on how to load certificates and public keys into an app bundle, use the builtin pinner and TrustKit.