Implement close method on Socket 1.x