Closed dnagaraj1986 closed 8 years ago
If you do something like
socket.bind(new AFUNIXSocketAddress(socketFile, 0, false, true)); AFUnixSocket s = socket.accept(); InputStream in = s.getInputStream(); byte[] buffer = new byte[MSG_SIZE]; int msgLen = in.read(buffer);
a single read will return you a single message. Is that what you are looking for? The accept call might seem unnecessary, and it actually doesn't perform an accept() for dgram, but that was the simplest way to implement it.
yes exactly thanks. Its working for me
how to process dgrampackets for UDS connection with junixsocket sock.bind(new AFUNIXSocketAddress(socketFile, 0, false, true)); And i do receive dgram packets socket = sockt.getInputStream(). I would like to process these similar to DgraPackets. How to do it?