Add socket methods