Archived
1
0
Fork 0

Reformat code to use the official kotlin code style

This commit is contained in:
Moritz Ruth 2020-08-14 20:54:07 +02:00
parent da7397e7f2
commit 0a4f835327
No known key found for this signature in database
GPG key ID: AFD57E23E753841B
47 changed files with 199 additions and 153 deletions

View file

@ -4,7 +4,7 @@ import io.netty.buffer.ByteBuf
import io.netty.channel.ChannelHandlerContext
import io.netty.handler.codec.ByteToMessageCodec
class FramingCodec: ByteToMessageCodec<ByteBuf>() {
class FramingCodec : ByteToMessageCodec<ByteBuf>() {
private var currentLength: Int? = null
override fun encode(ctx: ChannelHandlerContext, msg: ByteBuf, out: ByteBuf) {
@ -21,8 +21,7 @@ class FramingCodec: ByteToMessageCodec<ByteBuf>() {
if (msg.varIntReadable()) {
length = msg.readVarInt()
currentLength = length
}
else return
} else return
}
if (msg.readableBytes() >= length) {