iPhone/iPod receive messages from C# tcpip server using CocoaAsyncSocket

Posted by SorinA. on Stack Overflow See other posts from Stack Overflow or by SorinA.
Published on 2009-04-28T14:57:30Z Indexed on 2010/05/03 15:28 UTC
Read the original article Hit count: 770

Filed under:
|
|
|

Hello, i'm trying to send/receive data over wifi to an iphone/ipodtouch app from a C# tcpip server. for this i used cocoaAsyncSocket from the google project. If i push a button and i send a request from ipod to server it returns the requested data(song title for example)..i want to know every second what song is playng...so from C# server i send at intervals of 1 second messages to my app. In my app in an timer with the interval of 1 second i call the asyncSocket read readDataWithTimeout method. My problem is that after 8-9 seconds that method is not called anymore. The connection to the server is still active and the C# server still sends data..

what i want to do is the following thing: -> winamp plays a song -> C# server asks winamp what songs is he playing and sends the song title to my app. -> iphone app receives the data and displays it

i don't know why the readDataWithTimeout method is not called anymore after a short period of time..Maybe because the short time between messages sent by the C# server?

Thank you, Sorin

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipod