සරල චැට් ඇප්ලිකේෂන් එකක් හදාගන්න විදියක් කියන්න

Answers

  • ඉක්මනට මැ ඕනේ

  • mokadda ona karana language 1

  • dsomedsome Geek
    edited February 2017

    java walin mee

    Server code 1

    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    public class Server {

    public static void main(String[] args) {
        try {
            ServerSocket ss = new ServerSocket(2222);
            Socket s = ss.accept();
    
            DataInputStream din = new DataInputStream(s.getInputStream());
            DataOutputStream dout = new DataOutputStream(s.getOutputStream());
    
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
            String in, out;
            while (true) {
                in = din.readUTF();
                System.out.println(in);
                out = br.readLine();
                dout.writeUTF(out);
                dout.flush();
            }
    
        } catch (IOException ex) {
            Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    

    }

    Cliant code 1

    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.Socket;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    public class Cliant {
    public static void main(String[] args) {
    try {
    Socket s = new Socket("localhost", 2222);

            DataInputStream din = new DataInputStream(s.getInputStream());
            DataOutputStream dout = new DataOutputStream(s.getOutputStream());
    
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
            String in, out;
            while (true) {
                out = br.readLine();
                dout.writeUTF(out);
                dout.flush();
                in = din.readUTF();
                System.out.println(in);
            }
    
        } catch (IOException ex) {
            Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    

    }

  • php walin puluwan databases one

  • PHP + MYSQL
    ශ්‍රී ලංකීය පුරවැසියන්ගේ අධ්‍යාපනික හා තාක්ෂණික නවාතැන. Aluth.info | Sri lanka's best Educational and Technical Magazine

    http://www.aluth.info

ඔයත් එකතු වෙන්න දැන්ම Log වෙන්න. හෝ Geek කෙනෙක් වෙන්න