Baekalfen / ICAP-avscan

Uploads a file to a ICAP server.
MIT License
47 stars 29 forks source link

java.nio.channels.SocketChannel instead of java.net.Socket for ICAP connection ? #30

Open bcoreddy opened 1 year ago

bcoreddy commented 1 year ago

Can we use java.nio.channels.SocketChannel, java.net.InetSocketAddress instead of java.net.Socket and import java.net.InetAddress for ICAP connection , so that we can make non-blocking IO connection and calls to send file to ICAP server for virus scanning.

Do you suggest any examples on how to make this work with java.nio.channels.SocketChannel and respective java.nio like java.nio.ByteBuffer rather than using java.io.DataOutputStream, BufferedReader and InputStreamReader etc., ?