IOS and AsyncUDPSocket tutorial?

I am learning C and Objective-C, so I am still dependent on examples ...

I found AsyncUDPSocket, which has a lot of example code in the Google Code repository, but I'm not far enough to understand everything. I am trying to create an iPhone application that uses UDP to communicate with another device (Arduino). I have the end of the device (testing using the UDP Tool application). I just need help from iOS ...

An example with a lot of explanations will really help (i.e. a tutorial) ... Is there any code example with good comments?

+6
source share
1 answer

https://github.com/robbiehanson/CocoaAsyncSocket

GCDAsyncUdpSocket and AsyncUdpSocket are network libraries of UDP / IP sockets . Here are the main features available for both:

  • Native objective-c, fully autonomous in one class. No need to damp around with low level connectors. This class handles everything for you.
  • Full delegate support. Errors, sending parcels, receiving improvements, and disabling all call your delegation method.
  • A queue without blocking send and receive operations, with optional timeouts. You tell him what to send or receive, and he processes everything for you. Queue, buffering, waiting and checking errno - everything is automatically processed for you.
  • Support for IPv4 and IPv6. Automatically send / receive using IPv4 and / or IPv6. No more worrying about multiple sockets.
+7
source

Source: https://habr.com/ru/post/894238/


All Articles