func (s *Socket) writeClose(reasonErr error) {
	var reason string
	if reasonErr != nil && reasonErr != errSocketClosed {
		reason = reasonErr.Error()
		s.log.Printf("closing socket for %v at %v: %v", s.PlayerName, s.Addr, reason)
	}
	s.Conn.WriteClose(reason)
}
// writeClose writes a closeMessage with the reason, logging the reason.
writeClose writes a closeMessage with the reason, logging the reason.
// writeClose writes a closeMessage with the reason logging the reason .
func (s *Socket) writeClose(reasonErr error) {
	var reason string
	if reasonErr != nil && reasonErr != errSocketClosed {
		reason = reasonErr.Error()
		s.log.Printf("closing socket for %v at %v: %v", s.PlayerName, s.Addr, reason)
	}
	s.Conn.WriteClose(reason)
}
func ( s * Socket ) writeClose ( reasonErr error ) { var reason string if reasonErr != nil && reasonErr != errSocketClosed { reason = reasonErr . Error ( ) s . log . Printf ( " " , s . PlayerName , s . Addr , reason ) } s . Conn . WriteClose ( reason ) }
writeClose writes a closeMessage with the reason, logging the reason.
writeClose writes a closeMessage with the reason logging the reason .