Advertisement
Speedyyz

Untitled

Feb 13th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class MessageGui implements Message {
  2.  
  3. private String text;
  4.  
  5.  
  6.  
  7. @Override
  8. public void readFrom(ChannelBuf buf) {
  9. text=buf.readUTF();
  10.  
  11. }
  12.  
  13. @Override
  14. public void writeTo(ChannelBuf buf) {
  15. buf.writeUTF(text);
  16.  
  17. }
  18.  
  19.  
  20. public static class Handler implements MessageHandler<MessageGui>{
  21.  
  22. @Override
  23. public void handleMessage(MessageGui message, RemoteConnection connection, Platform.Type side) {
  24. System.out.println("Works");
  25.  
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement