in Netsocket it would be appropriate to throw an exception