Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Basically what you are looking for is a chatroom program? Have you tried looking into mIRC? mIRC is a free internet relay chat. What exactly are the requirements for the program? Is there a certain size that it must be? Are these flash games that you and your friends are playing taking up your full computer screen?</p> <p>Building a program would require a web-server(any computer with internet access would do), and you would have to open the ports on your network to allow the traffic to go through. </p> <p>A basic server in java would look something like this: Please note that after the first connection this "server" will close the connection.</p> <pre><code>import java.net.ServerSocket; import java.net.Socket; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Server { private static ServerSocket serverSocket; private static Socket clientSocket; private static BufferedReader bufferedReader; private static String inputLine; public static void main(String[] args) { // Wait for client to connect on 63400 try { serverSocket = new ServerSocket(63400); while(true){ clientSocket = serverSocket.accept(); // Create a reader bufferedReader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); // Get the client message while((inputLine = bufferedReader.readLine()) != null) {System.out.println(inputLine);} serverSocket.close(); System.out.println("close"); } } catch(IOException e) { System.out.println(e); } } } </code></pre> <p>And a client would almost be the same:</p> <pre><code>import java.net.Socket; import java.io.PrintWriter; public class client { private static Socket socket; private static PrintWriter printWriter; public static void main(String[] args) { try { //change "localhost" to the ip address that the client is on, and this number to the port socket = new Socket("localhost",63400); printWriter = new PrintWriter(socket.getOutputStream(),true); printWriter.println("Hello Socket"); } catch(Exception e) { System.out.println(e); } } } </code></pre> <p>If I am not mistaken printWriter is a 16-bit operation, and in order to reduce lag, if you were just sending text then you might want to use printStream(). I believe that this might be a bit quicker.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload