packagenetworkimport(context"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"bsmsg"github.com/jbenet/go-ipfs/exchange/bitswap/message"peer"github.com/jbenet/go-ipfs/peer")// Forwarder receives messages and forwards them to the delegate.//// Forwarder breaks the circular dependency between the BitSwap Session and the// Network Service.typeForwarderstruct{delegateReceiver}func(r*Forwarder)ReceiveMessage(ctxcontext.Context,sender*peer.Peer,incomingbsmsg.BitSwapMessage)(*peer.Peer,bsmsg.BitSwapMessage,error){ifr.delegate==nil{returnnil,nil,nil}returnr.delegate.ReceiveMessage(ctx,sender,incoming)}func(r*Forwarder)Delegate(delegateReceiver){r.delegate=delegate}