some fixes for socket classes. added a close method