socketPort is a partial function. It only supports AF_INET and AF_INET6. Its type signature is not really indicative of this. IO informs that this function could throw from an exception, but partiality should be communicated with Maybe.
Originally reported by @RyanGlScott here #318 (comment)