MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / Send

Method Send

internal/wsrelay/manager.go:164–170  ·  view source on GitHub ↗

Send forwards the message to the specific provider connection and returns a channel yielding response messages.

(ctx context.Context, provider string, msg Message)

Source from the content-addressed store, hash-verified

162// Send forwards the message to the specific provider connection and returns a channel
163// yielding response messages.
164func (m *Manager) Send(ctx context.Context, provider string, msg Message) (<-chan Message, error) {
165 s := m.session(provider)
166 if s == nil {
167 return nil, fmt.Errorf("wsrelay: provider %s not connected", provider)
168 }
169 return s.request(ctx, msg)
170}
171
172func (m *Manager) session(provider string) *session {
173 key := strings.ToLower(strings.TrimSpace(provider))

Callers 2

NonStreamMethod · 0.95
StreamMethod · 0.95

Calls 2

sessionMethod · 0.95
requestMethod · 0.80

Tested by

no test coverage detected