-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Login response handler validation rework (#54)
* refactor: perform client type validations during decoding, not encoding * refactor: remove channel activity check in writeSuccessfulResponse * refactor: separate validateNewConnection from writeSuccessfulResponse
- Loading branch information
Showing
64 changed files
with
648 additions
and
663 deletions.
There are no files selected for viewing
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
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
12 changes: 12 additions & 0 deletions
12
.../protocol/common/loginprot/incoming/codec/shared/exceptions/UnsupportedClientException.kt
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,12 @@ | ||
package net.rsprot.protocol.common.loginprot.incoming.codec.shared.exceptions | ||
|
||
/** | ||
* A singleton exception for whenever login decoding fails due to an unsupported client connecting to it. | ||
* It is not ideal to be using exceptions for flow control, but it is by far the easiest option | ||
* here. From a performance standpoint, only building stack traces is slow, which we aren't | ||
* going to be doing for this type of exception. | ||
*/ | ||
public data object UnsupportedClientException : RuntimeException() { | ||
@Suppress("unused") | ||
private fun readResolve(): Any = UnsupportedClientException | ||
} |
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
Oops, something went wrong.