Skip to content

Commit

Permalink
add methods for jetty 12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lawrence committed Mar 1, 2024
1 parent 2d82085 commit f29a406
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions ngrok-jetty/src/main/java/com/ngrok/jetty/NgrokEndpoint.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.ngrok.jetty;

import com.ngrok.Connection;
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.util.concurrent.TimeUnit;

import org.eclipse.jetty.io.AbstractEndPoint;
import org.eclipse.jetty.util.thread.Scheduler;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.TimeUnit;
import com.ngrok.Connection;

/**
* A class representing an endpoint for ngrok connection.
Expand Down Expand Up @@ -89,4 +90,14 @@ public boolean flush(ByteBuffer... buffer) throws IOException {
public Object getTransport() {
throw new UnsupportedOperationException("ohnoe");
}

@Override
public SocketAddress getLocalSocketAddress() {
return null;
}

@Override
public SocketAddress getRemoteSocketAddress() {
return conn.inetAddress();
}
}

0 comments on commit f29a406

Please sign in to comment.