I am trying to make a chat application which will use UDP connection.Using GCDAsyncUdpSocket
from here i am able to connect and send small text to another device with this function
- (void)sendData:(NSData *)data
toHost:(NSString *)host
port:(uint16_t)port
withTimeout:(NSTimeInterval)timeout
tag:(long)tag
But for large text it is not working. I have two questions here:
- Does GCDAsyncUdpSocket automatically breaks data into small piece of UDP packets and sends them? Or they sends all the data at once?
- How to break the whole text in small chunk before sending it using GCDAsyncUdpSocket and keeping track of the chunks? Is there any 3rd party code available for this?