views:

34

answers:

1

So I'm writing an application for my iphone that networks to my computer running a java application using AsyncSocket. But when I try sending data from my iPhone to the java application, the data only prints out when I exit the iPhone application. Why does this happen and how can I fix it?

+1  A: 

Not sure, but it sounds like you are not flushing the output to a socket (it probably gets flushed by force when it closes, when the application closes).

Lauri Lehtinen
yea, i just needed to add a '\n' to the end. thanks
Deniz O