diff --git a/internal/client/client.go b/internal/client/client.go index bbb77ad..cddebf8 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -359,10 +359,10 @@ func (c *Client) tunnel(conn net.Conn, sess *smux.Session, targetAddr string, ta func (c *Client) sendConnectRequest(stream *smux.Stream, targetAddr string, targetPort int) error { connectReq, err := json.Marshal(map[string]any{ - "cmd": "connect", - "client_id": c.clientID, - "addr": targetAddr, - "port": targetPort, + "cmd": "connect", + "clientId": c.clientID, + "addr": targetAddr, + "port": targetPort, }) if err != nil { return fmt.Errorf("sid=%d marshal connect req: %w", stream.ID(), err) diff --git a/internal/provider/telemost/peer.go b/internal/provider/telemost/peer.go index b83d8f5..49506ed 100644 --- a/internal/provider/telemost/peer.go +++ b/internal/provider/telemost/peer.go @@ -676,7 +676,7 @@ func (p *Peer) sendSetSlots() error { // generous number of slots so each subscriber can receive every active // publisher in the room. slots := make([]map[string]int, 0, 8) - for i := 0; i < 8; i++ { + for range 8 { slots = append(slots, map[string]int{"width": 1280, "height": 720}) } diff --git a/internal/server/server.go b/internal/server/server.go index 5302c1f..46a8490 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -51,7 +51,7 @@ type Server struct { // ConnectRequest is a message from the client to establish a new connection. type ConnectRequest struct { Cmd string `json:"cmd"` - ClientID string `json:"client_id"` + ClientID string `json:"clientId"` Addr string `json:"addr"` Port int `json:"port"` }