new WS ControlRequest data type

This commit is contained in:
Miroslav Šedivý 2020-06-15 22:26:47 +02:00
parent c176411512
commit 70e8b215cb
5 changed files with 20 additions and 3 deletions

View file

@ -31,9 +31,12 @@ func (h *MessageHandler) controlRelease(id string, session types.Session) error
return nil
}
func (h *MessageHandler) controlRequest(id string, session types.Session) error {
func (h *MessageHandler) controlRequest(id string, session types.Session, payload *message.ControlRequest) error {
// check for host
if !h.sessions.HasHost() {
// TODO: Keyboard Layout change.
h.logger.Warn().Msgf("should set keyboard to %s", payload.KeyboardLayout)
// set host
h.sessions.SetHost(id)