-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix private network address byte ranges
- Loading branch information
1 parent
6d4b12d
commit 0ac3f83
Showing
4 changed files
with
48 additions
and
51 deletions.
There are no files selected for viewing
14 changes: 0 additions & 14 deletions
14
IAN/udp/src/main/kotlin/com/walkertribe/ian/protocol/udp/ByteConstraint.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
IAN/udp/src/main/kotlin/com/walkertribe/ian/protocol/udp/IntConstraint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.walkertribe.ian.protocol.udp | ||
|
||
internal sealed interface IntConstraint { | ||
@JvmInline | ||
value class Equals(val value: Int) : IntConstraint { | ||
override fun check(int: Int): Boolean = int == value | ||
} | ||
|
||
class Range(val range: IntRange) : IntConstraint { | ||
override fun check(int: Int): Boolean = int in range | ||
} | ||
|
||
fun check(int: Int): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters