I am getting really annoyed with loads of IOExceptions from socket read calls due to network problems. Normally it simply means someone killed the child process or the network went down badly (VPN connection dropped etc). My server cannot do anything but I really dont want to see all these errors in the log files. Is there any way in
Tag: sockets
Android Socket + ObjectOutputStream not working correctly
I am developing a client/server program where the client is an android device. The server has a listener class that reads an object from the input stream. I created a client software for another COMPUTER that sends a small object over a local network. Computer to Computer works perfectly fine, i read the object and printed the contents. However, the
Add HEADER in HTTP Request in Java
I’m using this following code to send simple HTTP Request : However, as you can see, I don’t send a custom HEADER. What should I add to send a custom HEADER ? Answer When you write The rnrn bit is sending a line-feed/carriage-return to end the line and then another one to indicate that there are no more headers. This
Listen to a shoutcast with Android
since quite some time I’m trying to listen to .pls files (shoutcasts). I have to say that I failed horrible. Since StreamFurious can do it it must be possible. First I tried to connect to the shoutcast via sockets (TCP and UDP) –> failed. I couldn’t even receive one byte from the server. I’m at the verge of tears. I
Asynchronous IO in Java?
What options for async io (socket-based) are there in java other then java.nio? Also does java.nio use threads in the backround (as I think .NET’s async-socket-library does, maybe it’s been changed) or is it “true” async io using a proper select call? Answer Java’s NIO package (as of Java6), provides support for non-blocking I/O only, via Selectors. Java7 is hopefully