Starting with CocoaAsyncSocket

╄→гoц情女王★ 提交于 2019-12-24 10:47:30

问题


I've been looking for ways to send files (small sound recorded on the iphone) over TCP to a server and from the server to other devices. It seems like the easiest way to do so would be using the CocoaAsyncSocket project. (Is it true?)

However, while I could find many examples on how to use it, I couldn't find a single explanation on how to install it.

I'm relatively new to iOS and Xcode and quite lost in that. Could someone please explain to me how to get the library? (I know how to add a library to my project, however I only found download for the .m files thru the gitHub)

Thanks


回答1:


This library comes with a header file (either AsyncSocket.h or GCDAsyncSocket.h) and an implement file (either AsyncSocket.m or GCDAsyncSocket.m). All you need is to copy the .h and .m in your project. And using the #import statement to include the AsyncSocket or GCDAsyncSocket class in your class to use it. The library as you downloaded is not in a static library or framework compiled format. If you go thru the examples from the same author, you will see how it was done.



来源:https://stackoverflow.com/questions/10332084/starting-with-cocoaasyncsocket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!