test & correct socket interface calls