Handling Binary Data in Socket Programming