MCPcopy Index your code
hub / github.com/screego/server / Execute

Method Execute

ws/event_clientanswer.go:18–38  ·  view source on GitHub ↗
(rooms *Rooms, current ClientInfo)

Source from the content-addressed store, hash-verified

16type ClientAnswer outgoing.P2PMessage
17
18func (e *ClientAnswer) Execute(rooms *Rooms, current ClientInfo) error {
19 room, err := rooms.CurrentRoom(current)
20 if err != nil {
21 return err
22 }
23
24 session, ok := room.Sessions[e.SID]
25
26 if !ok {
27 log.Debug().Str("id", e.SID.String()).Msg("unknown session")
28 return nil
29 }
30
31 if session.Client != current.ID {
32 return fmt.Errorf("permission denied for session %s", e.SID)
33 }
34
35 room.Users[session.Host].WriteTimeout(outgoing.ClientAnswer(*e))
36
37 return nil
38}

Callers

nothing calls this directly

Calls 3

ClientAnswerTypeAlias · 0.92
CurrentRoomMethod · 0.80
WriteTimeoutMethod · 0.80

Tested by

no test coverage detected