changed socket function names