Socket wrapper for simple reading, writing, and processing of data of a network