When modifying an old application making use of sockets I found that I had used the old c-style function to handle the transmissions. I therefore constructed a class to handle this wrapping those methods in other to simplify my work, although I soon found this was ugly and therefor wished to use the sockets via the fstream interface instead; this to my great discomfort failed. Can anyone describe the correct usage of fstream in socketing applications?