Сообщение SocketException или null, если error не является SocketException.
SocketException
null
error
static String? socketMessage(Object? error) => impl.socketMessage(error);