一个Swift的WebSocket客户端
一个Swift的WebSocket客户端
Swift 网络库
共7Star
详细介绍
WebSocketClient
Installation
import PackageDescription
let package = Package(
dependencies: [
.Package(url: "https://github.com/Zewo/WebSocketClient.git", majorVersion: 0, minor: 14),
]
)
Example
import WebSocketClient
let name = "Dan"
let client = try WebSocketClient(url: "ws://localhost:8080") { ws in
print("Connected!")
ws.onClose { code, reason in
print("\(code): \(reason)")
}
try ws.send("Hi, I'm \(name)!")
}
try client.connect()
Support
If you need any help you can join our Slack and go to the #help channel. Or you can create a Github issue in our main repository. When stating your issue be sure to add enough details, specify what module is causing the problem and reproduction steps.
Community
The entire Zewo code base is licensed under MIT. By contributing to Zewo you are contributing to an open and engaged community of brilliant Swift programmers. Join us on Slack to get to know us!
License
This project is released under the MIT license. See LICENSE for details.
-
161 Star
-
11 Star
-
42 Star
-
1159 Star
-
1399 Star
-
7235 Star