Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.*;
- import java.io.*;
- import java.util.*;
- class Two {
- public static void main(String args[]) throws IOException {
- Socket s = new Socket("localhost",25000);
- Scanner sc = new Scanner(s.getInputStream());
- PrintWriter pw = new PrintWriter(s.getOutputStream(),true);
- //System.out.println(sc.nextLine());
- pw.println("Hello to the other side of the socket!");
- pw.println("Hello to the other side of the socket!");
- }
- }
Add Comment
Please, Sign In to add comment