diff options
Diffstat (limited to 'dht/src/Data')
-rw-r--r-- | dht/src/Data/Tox/Relay.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dht/src/Data/Tox/Relay.hs b/dht/src/Data/Tox/Relay.hs index 64c90806..1bce76db 100644 --- a/dht/src/Data/Tox/Relay.hs +++ b/dht/src/Data/Tox/Relay.hs | |||
@@ -72,8 +72,9 @@ data RelayPacket | |||
72 | newtype PacketNumber = PacketNumber { packetNumberToWord8 :: Word8 } | 72 | newtype PacketNumber = PacketNumber { packetNumberToWord8 :: Word8 } |
73 | deriving (Eq,Ord,Show) | 73 | deriving (Eq,Ord,Show) |
74 | 74 | ||
75 | pattern PingPacket = PacketNumber 4 | 75 | pattern RoutingRequestPacket = PacketNumber 0 |
76 | pattern OnionPacketID = PacketNumber 8 | 76 | pattern PingPacket = PacketNumber 4 |
77 | pattern OnionPacketID = PacketNumber 8 | ||
77 | 78 | ||
78 | packetNumber :: RelayPacket -> PacketNumber | 79 | packetNumber :: RelayPacket -> PacketNumber |
79 | packetNumber (RelayData _ (ConId conid)) = PacketNumber $ conid -- 0 to 15 not allowed. | 80 | packetNumber (RelayData _ (ConId conid)) = PacketNumber $ conid -- 0 to 15 not allowed. |