func (s *Stream) SendMsg(msg interface{}) {
	select {
	case s.sendBuffer <- msg: // normal flow if the channel is not blocked
	default:
		s.log.Debug("streambuffer: dropping message before send")
		atomic.AddUint64(&s.dropped, 1)
		<-s.sendBuffer // drop oldest and try again (if conn temporarily unavailable)
		select {
		case s.sendBuffer <- msg:
		default: // drop newest (too many cuncurrent SendMsg)
			s.log.Debug("streambuffer: dropping message before send")
			atomic.AddUint64(&s.dropped, 1)
		}
	}
}
func (s *Stream) SendMsg(msg interface{}) {
	select {
	case s.sendBuffer <- msg: // normal flow if the channel is not blocked
	default:
		s.log.Debug("streambuffer: dropping message before send")
		atomic.AddUint64(&s.dropped, 1)
		<-s.sendBuffer // drop oldest and try again (if conn temporarily unavailable)
		select {
		case s.sendBuffer <- msg:
		default: // drop newest (too many cuncurrent SendMsg)
			s.log.Debug("streambuffer: dropping message before send")
			atomic.AddUint64(&s.dropped, 1)
		}
	}
}
// SendMsg sends a message (possibly dropping a message on full buffers)