MCPcopy
hub / github.com/probelabs/goreplay / sendRequest

Method sendRequest

output_binary.go:146–164  ·  view source on GitHub ↗
(client *TCPClient, msg *Message)

Source from the content-addressed store, hash-verified

144}
145
146func (o *BinaryOutput) sendRequest(client *TCPClient, msg *Message) {
147 if !isRequestPayload(msg.Meta) {
148 return
149 }
150
151 uuid := payloadID(msg.Meta)
152
153 start := time.Now()
154 resp, err := client.Send(msg.Data)
155 stop := time.Now()
156
157 if err != nil {
158 Debug(1, "Request error:", err)
159 }
160
161 if o.config.TrackResponses {
162 o.responses <- response{resp, uuid, start.UnixNano(), stop.UnixNano() - start.UnixNano()}
163 }
164}
165
166func (o *BinaryOutput) String() string {
167 return "Binary output: " + o.address

Callers 1

startWorkerMethod · 0.95

Calls 4

isRequestPayloadFunction · 0.85
payloadIDFunction · 0.85
DebugFunction · 0.70
SendMethod · 0.45

Tested by

no test coverage detected