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
Post a Comment