no message
session: didReceiveStream: withName: fromPeer:

Solution to the problem that the delegated methods from the NSInputStream were never received: the problem was that this method is called in a secondary thread (different that the main one). So, when we were scheduling the inputStream to the current Run Loop, that runLoop belongs to the secondary thread, which may not live longer. So if this secondary thread ends, the events sent by the NSInputStream are never monitored and never called the delegate method stream: handleevent.

So the solution is to scheduling the NSInputStream to the mainRunLoop belonging to the main thread.