MCPcopy
hub / github.com/syncthing/syncthing / send

Method send

lib/protocol/protocol.go:703–714  ·  view source on GitHub ↗
(ctx context.Context, msg proto.Message, done chan struct{})

Source from the content-addressed store, hash-verified

701}
702
703func (c *rawConnection) send(ctx context.Context, msg proto.Message, done chan struct{}) bool {
704 select {
705 case c.outbox <- asyncMessage{msg, done}:
706 return true
707 case <-c.closed:
708 case <-ctx.Done():
709 }
710 if done != nil {
711 close(done)
712 }
713 return false
714}
715
716func (c *rawConnection) writerLoop() {
717 select {

Callers 6

IndexMethod · 0.95
IndexUpdateMethod · 0.95
RequestMethod · 0.95
DownloadProgressMethod · 0.95
pingMethod · 0.95
handleRequestMethod · 0.95

Calls 1

DoneMethod · 0.80

Tested by

no test coverage detected