fixed socket types and added (un-)bind, (dis-)connect
functions