Move the useful socket methods higher up