Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor YamuxHandler #326

Merged
merged 13 commits into from
Oct 9, 2023
15 changes: 15 additions & 0 deletions libp2p/src/main/kotlin/io/libp2p/mux/MuxerException.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.libp2p.mux

import io.libp2p.core.Libp2pException
import io.libp2p.etc.util.netty.mux.MuxId

open class MuxerException(message: String, ex: Exception?) : Libp2pException(message, ex)

open class ReadMuxerException(message: String, ex: Exception?) : MuxerException(message, ex)
open class WriteMuxerException(message: String, ex: Exception?) : MuxerException(message, ex)

class UnknownStreamIdMuxerException(muxId: MuxId) : ReadMuxerException("Stream with id $muxId not found", null)

class InvalidFrameMuxerException(message: String) : ReadMuxerException(message, null)

class WriteBufferOverflowMuxerException(message: String) : WriteMuxerException(message, null)
Loading