How can I send packet from android to SFML tcp server which is awaiting for int8 variable.
Server side:
sf:Int8 liczbunia;
listener.listen(55555);
listener.accept(socket);
cout << "connected";
sf::sleep(sf::milliseconds(500));
socket.receive( paket );
paket >> liczba;
I tried this code for client side:
Socket socketClient = new Socket("192.168.0.100",55555);
PrintWriter(socketClient.getOutputStream(),true);
DataOutputStream dout = new DataOutputStream(socketClient.getOutputStream());
dout.writeInt(9);
dout.flush();
Although the client connects to server, server doesn't receive the packet. What is the best way to send packets from android?