+(defmethod print-object ((object socket-simple-stream) stream)
+ (print-unreadable-object (object stream :type nil :identity nil)
+ (with-stream-class (socket-simple-stream object)
+ (cond ((not (any-stream-instance-flags object :simple))
+ (princ "Invalid " stream))
+ ((not (any-stream-instance-flags object :input :output))
+ (princ "Closed " stream)))
+ (format stream "~:(~A~)"
+ (type-of object))
+ (when (any-stream-instance-flags object :input :output)
+ (multiple-value-bind (host port)
+ (sb-bsd-sockets:socket-peername (sm socket object))
+ (format stream " connected to host ~S, port ~S" host port))))))
+