Advertisement
Guest User

Untitled

a guest
Nov 14th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3. import java.io.PrintWriter;
  4. import java.net.ServerSocket;
  5. import java.net.Socket;
  6.  
  7. /**
  8. * Created by sahaj on 11/5/2016.
  9. */
  10. public class Model {
  11. static String username = ""; //models the username in the server
  12. static String password = ""; //models the password in the server
  13. static int key; //models the key in the server
  14. static String suggestion = ""; //thest suggestions go in the string array
  15. static final String[] buttonsString = {"Small", "Medium", "large"}; //TODO change from final later
  16. String serverIP = "localhost";
  17. int serverPort = 50000;
  18. public Model() throws Exception{
  19. Socket socket = new Socket(serverIP,serverPort);
  20. PrintWriter out = new PrintWriter(socket.getOutputStream(),true);
  21. InputStreamReader isr = new InputStreamReader(socket.getInputStream());
  22. BufferedReader in = new BufferedReader(isr);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement