Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.net.*;
- public class SOK_1_CLIENT
- {
- public static void main(String[] args) throws Exception
- {
- SOK_1_CLIENT CLIENT = new SOK_1_CLIENT();
- CLIENT.run();
- }
- public void run() throws Exception
- {
- Socket SOCK = new Socket("192.159.104.19",444);
- PrintStream PS = new PrintStream(SOCK.getOutputStream());
- PS.println("Hello to server from client");
- InputStreamReader IR = new InputStreamReader(SOCK.getInputStream());
- BufferedReader BR = new BufferedReader(IR);
- String MESSAGE = BR.readLine();
- System.out.println(MESSAGE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement