Sending BufferedImage through socket
Hello, thanks in advance to anyone reading and helping me out here.
I have a simple client/server setup, in which the server reads in (using ObjectInputStream) a class I made that is a serialized container for a BufferedImage. The client needs to be able to send lots of images (screen captures) through the socket to the server as quickly as possible.
Currently, when I try to send BufferedImage objects through quickly (with a sleep timer to every 100 ms or so), the client does not seem able to send the images quick enough, and eventually I get an OutOfMemoryException 0 out of heapspace.
Is there an efficient way to send BufferedImage objects through the stream? I do NOT care about lost quality, so if I can reduce the quality thus reducing image size to increase transfer speed, that is OK.