You've asked your question in a vague and unspecific manner such that anyone who wanted to help you would have to guess what particular errors or mistakes you've encountered.
Post your code if you want someone to explain what you've done wrong.
… when attempting to send something, data is not send until ios application is terminated, at which point all earlier data is received by server.
CFSocketStream (which is what you get when you create a stream in this way) does not buffer any data in user space. The data you write gets immediately placed in the kernel socket buffer and, from there, should go out on the ‘wire’. I’ve worked with developer who’ve had problems like this before and they almost always end up being caused by buffering on the server.
You can determine whether this is the case by using a packet trace to see whether the data has hit the wire or not. See QA1176 Getting a Packet Trace for details.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
The issue was indeed on the server, thanks