Advertisement
Guest User

Untitled

a guest
Jun 29th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import androidx.appcompat.app.AppCompatActivity;
  2.  
  3. import android.os.Bundle;
  4.  
  5. public class mysocket {
  6. static void myMethod() {
  7.  
  8. Socket socket = new Socket("192.168.137.36", 5005);
  9. OutputStream out = socket.getOutputStream();
  10.  
  11. out.write("hello".getBytes());
  12. out.flush();
  13. out.close();
  14.  
  15. socket.close();
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement