Added an opition for socket