Brunet.Applications.Examples.HelloWorldNodeDataHandler.SendMessage C# (CSharp) Method

SendMessage() public method

This methods send some ICopyable data to the remote address.
public SendMessage ( Brunet.Address remote_addr, ICopyable data ) : void
remote_addr Brunet.Address Remote Nodes are referenced by their P2P /// Address, typically of type AHAddress.
data ICopyable This is an ICopyable object which contains the data /// to send.
return void
    public void SendMessage(Address remote_addr, ICopyable data) {
      // This instantiates a multi-use method to sending to the remote node,
      // though we will only use it once.  It is VERY similar to UDP.
      AHExactSender sender = new AHExactSender(_app_node.Node, remote_addr);
      // This is the process of actually sending the data.
      sender.Send(new CopyList(HW, data));
    }