Use shared_handler in Socket