-
Notifications
You must be signed in to change notification settings - Fork 4
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
27 changed files
with
946 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2020 - present Maksym Ostroverkhov. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
id "java-library" | ||
id "maven-publish" | ||
id "signing" | ||
} | ||
|
||
description = "netty-websocket-http2 integration with jauntsdn/netty-websocket-http1: high-performance websocket codec" | ||
|
||
dependencies { | ||
api project(":netty-websocket-http2") | ||
api "com.jauntsdn.netty:netty-websocket-http1" | ||
} | ||
|
||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
|
||
tasks.named("jar") { | ||
manifest { | ||
attributes("Automatic-Module-Name": "com.jauntsdn.netty.websocket.http2.codec.callbacks") | ||
} | ||
} |
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,21 @@ | ||
# This is a Gradle generated file for dependency locking. | ||
# Manual edits can break the build and are not advised. | ||
# This file is expected to be part of source control. | ||
com.google.code.findbugs:jsr305:3.0.2=googleJavaFormat1.6 | ||
com.google.errorprone:error_prone_annotations:2.0.18=googleJavaFormat1.6 | ||
com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6 | ||
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6 | ||
com.google.guava:guava:22.0=googleJavaFormat1.6 | ||
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6 | ||
com.jauntsdn.netty:netty-websocket-http1:0.9.0=compileClasspath | ||
io.netty:netty-buffer:4.1.86.Final=compileClasspath | ||
io.netty:netty-codec-http2:4.1.86.Final=compileClasspath | ||
io.netty:netty-codec-http:4.1.86.Final=compileClasspath | ||
io.netty:netty-codec:4.1.86.Final=compileClasspath | ||
io.netty:netty-common:4.1.86.Final=compileClasspath | ||
io.netty:netty-handler:4.1.86.Final=compileClasspath | ||
io.netty:netty-resolver:4.1.86.Final=compileClasspath | ||
io.netty:netty-transport-native-unix-common:4.1.86.Final=compileClasspath | ||
io.netty:netty-transport:4.1.86.Final=compileClasspath | ||
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6 | ||
empty=annotationProcessor |
33 changes: 33 additions & 0 deletions
33
.../main/java/com/jauntsdn/netty/handler/codec/http2/websocketx/WebSocketCallbacksCodec.java
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,33 @@ | ||
package com.jauntsdn.netty.handler.codec.http2.websocketx; | ||
|
||
import com.jauntsdn.netty.handler.codec.http.websocketx.WebSocketProtocol; | ||
import io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig; | ||
import io.netty.handler.codec.http.websocketx.WebSocketFrameDecoder; | ||
import io.netty.handler.codec.http.websocketx.WebSocketFrameEncoder; | ||
|
||
/** Provides integration with jauntsdn/netty-websocket-http1 - high performance websocket codec. */ | ||
public final class WebSocketCallbacksCodec implements Http1WebSocketCodec { | ||
private static final WebSocketCallbacksCodec INSTANCE = new WebSocketCallbacksCodec(); | ||
|
||
private WebSocketCallbacksCodec() {} | ||
|
||
public static WebSocketCallbacksCodec instance() { | ||
return INSTANCE; | ||
} | ||
|
||
@Override | ||
public WebSocketFrameEncoder encoder(boolean maskPayload) { | ||
return WebSocketProtocol.frameEncoder(maskPayload); | ||
} | ||
|
||
@Override | ||
public WebSocketFrameDecoder decoder(WebSocketDecoderConfig config) { | ||
return WebSocketProtocol.frameDecoder( | ||
config.maxFramePayloadLength(), config.expectMaskedFrames(), config.allowMaskMismatch()); | ||
} | ||
|
||
@Override | ||
public void validate(boolean maskPayload, WebSocketDecoderConfig config) { | ||
WebSocketProtocol.validateDecoderConfig(config); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.