Implementing method 'bind' for Socket and ServerSocket