Add separate sockets for tpu forwarder and run different protocol for those sockets

This commit is contained in:
Carl
2019-03-08 15:47:53 -08:00
committed by Pankaj Garg
parent 7beefb3f81
commit 536c8accf8
3 changed files with 58 additions and 6 deletions

View File

@@ -115,6 +115,10 @@ impl Default for Packets {
}
impl Packets {
pub fn new(packets: Vec<Packet>) -> Self {
Self { packets }
}
pub fn set_addr(&mut self, addr: &SocketAddr) {
for m in self.packets.iter_mut() {
m.meta.set_addr(&addr);