diff --git a/src/runtime2/port.rs b/src/runtime2/port.rs index 579c7ee61b07d1f5566dcba57a6942f8c807e7a6..9e51424b942b6f488136f6151409a8c75cb426fb 100644 --- a/src/runtime2/port.rs +++ b/src/runtime2/port.rs @@ -21,6 +21,17 @@ impl PortIdLocal { } } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct ChannelId { + pub index: u32, +} + +impl ChannelId { + pub fn new(id: u32) -> Self { + return Self{ index: id }; + } +} + #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum PortKind { Putter, @@ -41,6 +52,7 @@ pub enum PortState { pub struct Port { pub self_id: PortIdLocal, pub peer_id: PortIdLocal, + pub channel_id: ChannelId, pub kind: PortKind, pub state: PortState, pub peer_connector: ConnectorId, // might be temporarily inconsistent while peer port is sent around in non-sync phase