-   Notifications  
You must be signed in to change notification settings  - Fork 0
 
Closed
Description
Python test script:
#py27 import socket import time if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', 9999)) for i in range(10): msg = "abcdefgh-%s" % i print "send %s" % msg s.sendall(msg) r = s.recv(1024) print r #print msg == r #assert msg == r # shutdown gracefully, or server won't recieive EOF which will lead to  # exception. s.shutdown(socket.SHUT_RDWR) s.close()Reproduce steps/env:
- The buffer in server is only 8.
 - Send message whose size is bigger than 8 every time (s.sendall()
 
Got error in stdout:
Exception in thread "main" java.io.IOException: Broken pipe	at sun.nio.ch.FileDispatcherImpl.write0(Native Method)	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)	at sun.nio.ch.IOUtil.write(IOUtil.java:65)	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)	at com.hello.echo.server.RealNioEchoServer.server(RealNioEchoServer.java:86)	at com.hello.echo.server.RealNioEchoServer.main(RealNioEchoServer.java:99) Metadata
Metadata
Assignees
Labels
No labels