Skip to content

Commit

Permalink
Update MxController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
youfanx committed Nov 6, 2024
1 parent 8679bdd commit a44999b
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions rxlib/src/main/java/org/rx/spring/MxController.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.rx.io.IOStream;
import org.rx.net.NetEventWait;
import org.rx.net.Sockets;
import org.rx.net.http.HttpClient;
import org.rx.net.socks.SocksContext;
import org.rx.util.BeanMapFlag;
import org.rx.util.BeanMapper;
Expand All @@ -28,6 +29,7 @@
import javax.annotation.PostConstruct;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.management.ManagementFactory;
import java.lang.reflect.Method;
import java.net.InetAddress;
Expand Down Expand Up @@ -138,15 +140,19 @@ public Object health(HttpServletRequest request) {
}
}

// @PostMapping("directOffer")
// public void directOffer(String appName, String socksId, String endpoint, MultipartFile binary) {
// SendPack pack = new SendPack(appName, socksId, Sockets.parseEndpoint(endpoint));
// pack.setBinary(binary);
// server.frontendOffer(pack);
// }
//
@RequestMapping("health/p")
public void healthP(HttpServletRequest request, HttpServletResponse response) {
String fu = request.getParameter("fu");
Integer tm = Reflects.convertQuietly(request.getParameter("tm"), Integer.class);
HttpClient client = new HttpClient();
if (tm != null) {
client.withTimeoutMillis(tm);
}
client.forward(request, response, fu);
}

// @SneakyThrows
// @PostMapping("directPoll")
// @PostMapping("directPoll/Offer")
// public void directPoll(String appName, String socksId, String endpoint, HttpServletResponse response) {
// ReceivePack pack = server.frontendPoll(new SendPack(appName, socksId, Sockets.parseEndpoint(endpoint)));
// ServletOutputStream out = response.getOutputStream();
Expand Down

0 comments on commit a44999b

Please sign in to comment.