I have a socketio server running and I want to interact with it with Java. I know that there is an official client, but I couldn't get it to work for a regular java project, so i'm trying to see if I can interact with it through regular sockets. Here's what I have so far:
Socket sock = new Socket("127.0.0.1", 5000);
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(sock.getInputStream()));
PrintWriter outToServer = new PrintWriter(sock.getOutputStream(), true);
outToServer.println("connect");
while(true){
while(inFromServer.ready()){
inFromServer.readLine();
}
}
It appears to connect, but I don't get any response from neither the client or server. What exactly do I need to send to get a response from the server? And what information will I get back?