Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- import java.io.PrintWriter;
- import java.net.ServerSocket;
- import java.net.Socket;
- /**
- * Created by sahaj on 11/5/2016.
- */
- public class Model {
- static String username = ""; //models the username in the server
- static String password = ""; //models the password in the server
- static int key; //models the key in the server
- static String suggestion = ""; //thest suggestions go in the string array
- static final String[] buttonsString = {"Small", "Medium", "large"}; //TODO change from final later
- String serverIP = "localhost";
- int serverPort = 50000;
- public Model() throws Exception{
- Socket socket = new Socket(serverIP,serverPort);
- PrintWriter out = new PrintWriter(socket.getOutputStream(),true);
- InputStreamReader isr = new InputStreamReader(socket.getInputStream());
- BufferedReader in = new BufferedReader(isr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement