Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.net.Socket;
- public class Main {
- public static void main(String args[]) throws IOException {
- Socket s = new Socket("irc.mgts.by", 6667);
- InputStream in = s.getInputStream();
- OutputStream out = s.getOutputStream();
- for (;;) {
- int command = System.in.read();
- int get;
- out.write(command);
- while((get = in.read()) != -1){
- System.out.print((char)get);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement