add socket methods