sockets - Problems receiving UPD Package with AsyncUdpSocket on Iphone SDK -


i have small app test sockethandling on iphone , use asyncsocket/asyncudpsocket lib.

opening socket , sending not problem receiving is.

//called when state received - (bool)onudpsocket:(asyncudpsocket *)sock didreceivedata:(nsdata *)data withtag:(long)tag fromhost:(nsstring *)host port:(uint16)port {     nslog(@"incoming data");      [sock receivewithtimeout:-1 tag:0];     return yes; } 

as said, not anything, question is, method gets called when upd package complete ? how package needs end? 0 byte?

thanks

you should call receive method (i think positive timeout) after sending out packet. when response received delegate method called , can process received data.

-raliz


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -