How to implement UDP client and send data in Swift on iPhone?

后端 未结 4 1745
遇见更好的自我
遇见更好的自我 2020-12-15 13:21

I want to develop UDP client and send data in Swift.

I have reference the following link:

Swift: Receive UDP with GCDAsyncUdpSocket

Retrieving a stri

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 14:04

    After pretty extensive research coming up with only basic pointers towards GCD's AsyncSocket, and being a pure Swift trained iOS programmer, I looked for something with native Swift socket support.

    Thankfully, I found a much simpler alternative to using Async, called SwiftSocket.

    The github (https://github.com/xyyc/SwiftSocket) has examples for most sockets, and is ready to use by copying just a few files into a project.

    For swift-only devs, I feel its underutilized and will quickly replace Async for non-objective-c apps. Then again I'm pretty new to this stuff so I may be way off :D

提交回复
热议问题