func (server *Server) Send(id string, binary bool, data []byte) error {
	server.RLock()
	session := server.findSession(id)
	server.RUnlock()

	if session == nil {
		return errors.New("invalid session")
	}

	return session.Send(packet.NewMessage(binary, data))
}
// Send sends message to a specific session
Send sends message to a specific session
// Send sends message to a specific session
func (server *Server) Send(id string, binary bool, data []byte) error {
	server.RLock()
	session := server.findSession(id)
	server.RUnlock()
	if session == nil {
		return errors.New("invalid session")
	}
	return session.Send(packet.NewMessage(binary, data))
}
func ( server * Server ) Send ( id string , binary bool , data [ ] byte ) error { server . RLock ( ) session := server . findSession ( id ) server . RUnlock ( ) if session == nil { return errors . New ( " " ) } return session . Send ( packet . NewMessage ( binary , data ) ) }
Send sends message to a specific session
Send sends message to a specific session