Implement more functions in Socket object