try codec
This commit is contained in:
parent
6a73c0199b
commit
38f1cb0750
@ -14,7 +14,6 @@ dependencies {
|
||||
implementation 'com.google.inject:guice:5.1.0'
|
||||
implementation 'com.twitter:finagle-http2_2.13:22.4.0'
|
||||
implementation 'com.twitter:finagle-core_2.10:6.35.0'
|
||||
|
||||
implementation 'com.twitter:finagle-http_2.13:22.4.0'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
|
||||
|
||||
@ -1,18 +1,22 @@
|
||||
package ro.mihai;
|
||||
|
||||
import com.twitter.finagle.Codec;
|
||||
import com.twitter.finagle.Http;
|
||||
import com.twitter.finagle.Service;
|
||||
import com.twitter.finagle.builder.ServerBuilder;
|
||||
import com.twitter.finagle.http.codec.HttpCodec;
|
||||
import com.twitter.util.Future;
|
||||
|
||||
|
||||
|
||||
import io.netty.handler.codec.http2.Http2Connection;
|
||||
import org.jboss.netty.handler.codec.http.*;
|
||||
import org.jboss.netty.handler.codec.http.HttpRequest;
|
||||
import org.jboss.netty.handler.codec.http.HttpResponse;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import static com.twitter.finagle.Http.Http2;
|
||||
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
@ -25,8 +29,9 @@ public class Main {
|
||||
}
|
||||
};
|
||||
|
||||
HttpCodec blah = new HttpCodec();
|
||||
ServerBuilder.safeBuild(service, ServerBuilder.get()
|
||||
.codec(Http())
|
||||
.codec(blah)
|
||||
.name("HttpServer")
|
||||
.bindTo(new InetSocketAddress("localhost", 10000)));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user