Home NanoHttpd (android) streaming voice over local network (http)
 I'm trying to stream voice over nanohttp from an android device to another ( on the same local network ). I've been trying few things and I got something to work but i have the feeling I'm doing it wrong somewhat. MainActivity() ... ParcelFileDescriptor[] fdPair = new ParcelFileDescriptor[0]; try { fdPair = ParcelFileDescriptor.createPipe(); } catch (IOException e) { e.printStackTrace(); } //get a handle to your read and write fd objects m_readFd = fdPair[0]; m_writeFd = fdPair[1]; // m_writer is given send do the microphoneHandler // m_reader is given to the webServ part m_reader = new FileInputStream( m_readFd.getFileDescriptor()); m_writer = new FileOutputStream( m_writeFd.getFileDescriptor()); ...  and for the server part // not sure why but if i don't put this // I have to keep refreshing the page to // get the full record m_fileInputStream.mark(10000); return newChunkedResponse(Response.Status.OK,"audio/aac", m_fileInputStream );  It is quite working and i can hear my voice on the second device BUT If I try to refresh the page or I want to open a second one on another device I get an error : E/fi.iki.elonen.NanoHTTPD: Could not send response to the client java.net.SocketException: sendto failed: EPIPE (Broken pipe)  I will need it to work with multiple device. Did I get something wrong with the pipes ? Is it about the server Response ? Or maybe I am totally in the wrong way... Any advices or tips would be appreciated.