kohlschutter / junixsocket

Unix Domain Sockets in Java 7 and newer (AF_UNIX), AF_TIPC, AF_VSOCK, and more
Apache License 2.0
438 stars 114 forks source link

Read takes long time. #48

Closed princrai closed 5 years ago

princrai commented 6 years ago

Hello,

I am using JUnixSocket to read and write to a UNIX socket where a c++ process is listening to. I am seeing big difference between read and write cpu time. Read is taking good amount of long time(Attached the snapshot). Also wanted to check what should be the ideal buffer size to read from the socket. Write now I am reading in a while loop of size 224K.

Thanks, Prince junixread

kohlschuetter commented 5 years ago

Please provide a reproducible test case as well as a description of the environment you're seeing this issue in (platform, architecture, etc.)