解决方法:将NSStreamEventErrorOccurred 替换为 NSStreamStatusError. 转载于:https://www.cnblogs.com/tonyxu/p/4297334.html