basic socket interface defined