-
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.
- Loading branch information
Showing
6 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
aio-core/build/classes/java/main/org/smartboot/socket/transport/DirectBufferUtil.class
Binary file not shown.
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 |
---|---|---|
|
@@ -37,7 +37,6 @@ public String run() { | |
return var1; | ||
} | ||
} catch (NumberFormatException var3) { | ||
; | ||
} | ||
} | ||
|
||
|
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
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,19 @@ | ||
package com.zy.service | ||
|
||
import org.smartboot.socket.transport.AioSession | ||
import java.nio.ByteBuffer | ||
|
||
/** | ||
* 消息编解码 | ||
*/ | ||
interface Protocol<T> { | ||
/** | ||
* 数据按protocol进行解码 | ||
*/ | ||
fun decode(readBuffer: ByteBuffer, attachment: Attachment<T>): T | ||
|
||
/** | ||
* 数据按protocol进行编码 | ||
*/ | ||
fun encode(msg: T, attachment: Attachment<T>): ByteBuffer | ||
} |
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