Commit 630850c5 authored by Him188's avatar Him188

Remove redundant receiver

parent 569e69b0
...@@ -73,7 +73,7 @@ private fun listenDevice(localIp: String, device: PcapNetworkInterface) { ...@@ -73,7 +73,7 @@ private fun listenDevice(localIp: String, device: PcapNetworkInterface) {
runBlocking { runBlocking {
withContext(DISPATCHER) { withContext(DISPATCHER) {
try { try {
PacketDebugger.dataReceived(it.rawData.drop(42).toByteArray()) dataReceived(it.rawData.drop(42).toByteArray())
} catch (e: Throwable) { } catch (e: Throwable) {
e.printStackTrace() e.printStackTrace()
} }
...@@ -117,6 +117,7 @@ internal fun Recorder.writeTo(file: File) { ...@@ -117,6 +117,7 @@ internal fun Recorder.writeTo(file: File) {
file.writeText(Json.plain.toJson(ArrayListSerializer(Recorder.Record.serializer()), this.list).toString(), Charset.defaultCharset()) file.writeText(Json.plain.toJson(ArrayListSerializer(Recorder.Record.serializer()), this.list).toString(), Charset.defaultCharset())
} }
@Suppress("unused")
suspend fun main() { suspend fun main() {
fun startPacketListening() { fun startPacketListening() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment