java - Usage of WiFi-Direct in Game Development (Android) -
I am developing board games in Android. I want to play this game on two different devices, for that I have to use WiFi-Direct. I want to know that any library is available which will help me find and connect with the device
I am interested in the built-in library. Or, if possible, please share the implementation examples of client / server architecture.
This is for the server:
thread servertrread = new thread (New Runnabal) {@Override Public Zero Run ({{serverSocketTCP = New ServerSet ()); ServerSocketTCP. Reset Resetress (true); Server socketsccp.band (newinetacademyadder ports)); Whereas (status) {clientSocketTCP = serverSocketTCP.accept (); BufferedReader bufferedReader = New InputStreamReader (client.getInputStream ()); Output stream output stream = client.getOutputStream ();}} Catch (exception E) {E.printStackTrace ();}}}; serverThread.start () ; This is for the customer:
socket client socket = new socket (server IP, serverport); Outputstream = clientSocket.getOutputStream (); bufferedReader = New buffer reader (New Input Stereo Reader (clientSocket.getInputStream ());
Comments
Post a Comment