From dccc46d16b50d07a58497833c7d23a7f50099fb5 Mon Sep 17 00:00:00 2001 From: Robinson Date: Sat, 24 Apr 2021 00:07:49 +0200 Subject: [PATCH] Updated to kotlin --- src/dorkbox/network/handshake/UpgradeType.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/dorkbox/network/handshake/UpgradeType.kt b/src/dorkbox/network/handshake/UpgradeType.kt index a569f769..4e1d6d22 100644 --- a/src/dorkbox/network/handshake/UpgradeType.kt +++ b/src/dorkbox/network/handshake/UpgradeType.kt @@ -13,14 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package dorkbox.network.handshake; +package dorkbox.network.handshake -public -class UpgradeType { +object UpgradeType { // The check is > 0, so these MUST be all > 0 - - public static final byte NONE = (byte) 1; - public static final byte ENCRYPT = (byte) 2; - public static final byte COMPRESS = (byte) 3; - public static final byte FRAGMENTED = (byte) 4; + const val NONE = 1.toByte() + const val ENCRYPT = 2.toByte() + const val COMPRESS = 3.toByte() + const val FRAGMENTED = 4.toByte() }