esoe 2 years ago
parent
commit
b5fc70ba99
  1. 3
      src/main/java/ru/molokoin/Connection.java
  2. 27
      src/main/java/ru/molokoin/RequestMessage.java
  3. BIN
      target/classes/ru/molokoin/Connection.class
  4. BIN
      target/classes/ru/molokoin/RequestMessage.class

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

@ -37,7 +37,8 @@ public class Connection {
System.out.println("Read " + bytesRead); System.out.println("Read " + bytesRead);
buf.flip(); buf.flip();
while(buf.hasRemaining()){ while(buf.hasRemaining()){
System.out.print((char)buf.get()); char c = (char)buf.get();
System.out.print(c);
//HttpResponse<String> responseOfString; //HttpResponse<String> responseOfString;
//String s = HttpRequest.BodyPublishers::ofString("String"); //String s = HttpRequest.BodyPublishers::ofString("String");
//accepted.write(buf); //accepted.write(buf);

27
src/main/java/ru/molokoin/RequestMessage.java

@ -0,0 +1,27 @@
package ru.molokoin;
/**
* Запрос пользователя
* get/post текстовый запрос, структурированный в объект для обработки
*/
public class RequestMessage {
private String text;
RequestMessage(String msg){
setText(msg);
}
/**
* @param text the text to set
*/
public void setText(String text) {
this.text = text;
}
/**
* @return the text
*/
public String getText() {
return text;
}
}

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

Binary file not shown.

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

Binary file not shown.
Loading…
Cancel
Save