i tried your first example with aStreams and an esp8266 sending data through
"client.connect"; "client.println(...)"; and "client.stop();".
It works fine. The mobile receives all data.
But when i close the app - the connection still stays alive.
After starting the app again - it crashes and...