add socket utilities