MCPcopy
hub / github.com/davyxu/cellnet / OnOutboundEvent

Method OnOutboundEvent

proc/tcp/hooker.go:43–67  ·  view source on GitHub ↗
(inputEvent cellnet.Event)

Source from the content-addressed store, hash-verified

41}
42
43func (self MsgHooker) OnOutboundEvent(inputEvent cellnet.Event) (outputEvent cellnet.Event) {
44
45 handled, err := rpc.ResolveOutboundEvent(inputEvent)
46
47 if err != nil {
48 log.Errorln("rpc.ResolveOutboundEvent:", err)
49 return nil
50 }
51
52 if !handled {
53
54 handled, err = relay.ResolveOutboundEvent(inputEvent)
55
56 if err != nil {
57 log.Errorln("relay.ResolveOutboundEvent:", err)
58 return nil
59 }
60
61 if !handled {
62 msglog.WriteSendLogger(log, "tcp", inputEvent.Session(), inputEvent.Message())
63 }
64 }
65
66 return inputEvent
67}

Callers

nothing calls this directly

Calls 5

ResolveOutboundEventFunction · 0.92
ResolveOutboundEventFunction · 0.92
WriteSendLoggerFunction · 0.92
SessionMethod · 0.65
MessageMethod · 0.65

Tested by

no test coverage detected