Hello,
i'm writing a little app for iphone that needs to comunicate over TCP/IP with a C# server. My iphone app is working..it can send and receive data from the C# server after connecting to it(for that i am using the AsyncSocket class from google code project), the C# server also can send and receive data from/to the iphone app.
my problem is when the iphone app receives a message from the server it can't display it right away. for example i have a UILabel serverMessage. If i read the data from the socket and i say serverMessage.Text = (data from the socket) it will not show the message sent... but if i reload the view the data send from the server it will be available...
this problem that i have does not resume only in the case when i want to show the data sent by the server but also when i try to access it after reading it from the socket.
any ideas? i found on another site a similar problem but they resolved it by making another thread for listening on the port.. also they used notifications..when something was received the views registered to receive notification would act..
it sounded like a very good idea..but when i hear about threading i'm a little in the dark...
thank you in advance
i'm writing a little app for iphone that needs to comunicate over TCP/IP with a C# server. My iphone app is working..it can send and receive data from the C# server after connecting to it(for that i am using the AsyncSocket class from google code project), the C# server also can send and receive data from/to the iphone app.
my problem is when the iphone app receives a message from the server it can't display it right away. for example i have a UILabel serverMessage. If i read the data from the socket and i say serverMessage.Text = (data from the socket) it will not show the message sent... but if i reload the view the data send from the server it will be available...
this problem that i have does not resume only in the case when i want to show the data sent by the server but also when i try to access it after reading it from the socket.
any ideas? i found on another site a similar problem but they resolved it by making another thread for listening on the port.. also they used notifications..when something was received the views registered to receive notification would act..
it sounded like a very good idea..but when i hear about threading i'm a little in the dark...
thank you in advance