bem server: Add ability to disable listening on net socket

Also check for port type: it must be int.