| | |
| | | public class MyNanoHttpServer extends NanoHTTPD { |
| | | |
| | | //声明服务端 端口 |
| | | public static final Integer HTTP_PORT = 49152; |
| | | public static Integer HTTP_PORT = 49152;// 46219; |
| | | |
| | | public MyNanoHttpServer(String hostname, int port) { |
| | | super(hostname, port); |
| | |
| | | //响应客户端 |
| | | Response response = newFixedLengthResponse(newByte); |
| | | response.addHeader("Content-Range", range + "/" + sourceDataByte.length);//伟南需要这个字段 |
| | | HdlLogLogic.print("http回复数据===请求大小-->" + range + "=====文件大小-->" + sourceDataByte.length, true); |
| | | HdlLogLogic.print("http回复数据===请求大小--" + range + "=====文件大小--" + sourceDataByte.length, true); |
| | | return response; |
| | | } |
| | | } |