Home  >  Q&A  >  body text

java - 我现在一个servlet中有调用socket访问,作为socket的客户端,

我现在一个servlet中有调用socket访问,作为socket的客户端,发现并发一上来,就报java.net.SocketException: Connection reset

现在想把传统的socket ,client改成 NIO模式,发现服务端不能正常接收,不知道为啥?
难道服务端要支持NIO??

高洛峰高洛峰2763 days ago603

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-18 10:51:17

    I have found the reason, it is mainly caused by a line of code in the client.

    reply
    0
  • Cancelreply