While I can get some other way for doing it (or rewrite the listener...) I've made the thread where the socket is listening to sleep a few milliseconds between one of the messages...

Not a very stylish way of solving the problem...