esoe 2 years ago
parent
commit
cee8789a94
  1. 1
      src/main/java/module-info.java
  2. 4
      src/main/java/ru/molokoin/Connection.java
  3. BIN
      target/classes/module-info.class
  4. BIN
      target/classes/ru/molokoin/Connection.class

1
src/main/java/module-info.java

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
module ru.molokoin {
requires transitive javafx.controls;
requires transitive javafx.fxml;
requires transitive java.net.http;
exports ru.molokoin;
}

4
src/main/java/ru/molokoin/Connection.java

@ -2,6 +2,7 @@ package ru.molokoin; @@ -2,6 +2,7 @@ package ru.molokoin;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.http.HttpResponse;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SocketChannel;
@ -10,6 +11,7 @@ import java.nio.file.Paths; @@ -10,6 +11,7 @@ import java.nio.file.Paths;
public class Connection {
public SocketChannel accepted = null;
public Connection(){}
public Connection(SocketChannel accepted){
this.accepted = accepted;
@ -27,6 +29,8 @@ public class Connection { @@ -27,6 +29,8 @@ public class Connection {
buf.flip();
while(buf.hasRemaining()){
System.out.print((char)buf.get());
//HttpResponse<String> responseOfString;
//String s = HttpRequest.BodyPublishers::ofString("String");
//accepted.write(buf);
}
buf.clear();

BIN
target/classes/module-info.class

Binary file not shown.

BIN
target/classes/ru/molokoin/Connection.class

Binary file not shown.
Loading…
Cancel
Save