- // All packets to be sent to the network will be delivered via these
- // functions.
- virtual bool SendPacket(const transport::Packet& packet) = 0;
-
+ // Send a packet to the network. Returns false if the network is blocked
+ // and we should wait for |cb| to be called. It is not allowed to called
+ // SendPacket again until |cb| has been called. Any other errors that
+ // occur will be reported through side channels, in such cases, this function
+ // will return true indicating that the channel is not blocked.
+ virtual bool SendPacket(PacketRef packet, const base::Closure& cb) = 0;