fix socket prototype mixing, get tests to pass