22019, 1/1101 회원가입  로그인  
   netwow1
   http://www.elhackeer.net
   ⊙ 자바 네트워크 프로그래밍 가르처줘니다

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Board&no=3769 [복사]


⊙ 자바 네트워크 프로그래밍
nURL(Uniform Resource Locator)
   protocol://hostname[:port]/path/filename#section

   프로토콜에는 다음과 같은 것이 있다.
   file       : 하드 디스크에 있는 파일
   ftp         : FTP 서버에 연결
   http        : 웹서버에 연결
   gopher   : gopher 서버에 연결
   news    : usenet 뉴스 그룹에 연결
   telnet          : 텔넷 서비스를 이용
   wais          : wais 서버에 연결
import java.awt.*; import java.net.*; import java.applet.Applet;  public class URLButton extends Applet {  URL url = null;  String title = null;    public void init() {   String urlString = null;   setLayout(new GridLayout(1,1));   title = getParameter("title");   if(title == null)       title = "URLButton";       urlString = getParameter("url");   if(urlString == null)          urlString = "http://";          try{           url = new URL(urlString);          }catch(MalformedURLException e) {           System.out.println("Invalid URL : " + urlString);          }          Button site = new Button(title);          add(site);          resize(100, 60);  }    public boolean action(Event e, Object arg) {   if(e.target instanceof Button) {    getAppletContext().showDocument(url);   }   return false;  } }        
§URLButton.java

<html> <body bgcolor="#ffffff"> <applet code = URLButton.class width=100 height=50> <param name=title value="WebZine"> <param name=url value="http://203.253.23.3/special.shtml"> </applet>  <applet code = URLButton.class width=100 height=50> <param name=title value="BBS"> <param name=url value="http://203.253.24.55/~bbs/"> </applet>  <applet code = URLButton.class width=100 height=50> <param name=title value="WebNews"> <param name=url value="http://203.253.23.3/"> </applet>  <applet code = URLButton.class width=100 height=50> <param name=title value="내외컴퓨터"> <param name=url value="http://www.nwcom.co.kr"> </applet>  </html>        
§URLButton.html


§실행 예




nMalformedURLException   지정된 URL이 유효하지 않음을 나타낸다.
ngetAppletContext
  §애플릿이 나타날 브라우저를 표현한다.
  §애플릿에 대한 AppletContext를 구한다.
nshowDocument
  public void showDocument( URL url );
  public void showDocument( URL url, String target );
  §브라우저에 새로운 문서를 연다.
  §parameter
   §url          브라우저가 오픈할 문서를 가리킴
값        의미        
"_self" "_parent" "_top" "_blank"        애플릿이 삽입된 것과 동일한 프레임 애플릿이 삽입된 프레임의 부모 프레임 애플릿이 나타날 최상위 수준의 윈도우 새로운 최상위 수준의 이름 없는 프레임        

   §target    나타낼 새로운 문서
n소켓
     일반적으로 C 언어를 이용해서 네트워크 프로그램을 작성하는 경우, 프로그램 절차는
   다음 그림과 같다.

  §서버 프로그램은 소켓을 생성하고, bind()를 이용해서 소켓과 어드레스 및 포트를 결합시킨다.
  §listen() 함수를 호출하고, bind()함수를 호출해서 클라이언트로부터 요청이 올 때까지
    블록되어서 기다린다.
  §bind() 함수는 클라이언트로부터 요청이 오면 클라이언트와 통신할 수 있는 소켓을
    만들어서 리턴한다.
  §리턴된 소켓을 통해서 서버와 클라이언트는 read()/write() 함수를 이용해서 통신할 수 있다.
  §클라이언트에서는 소켓을 생성하고, connect() 함수를 통해서 서버에 연결을 시도한다.
  §connect()를 호출하면, 서버에서는 accept() 함수가 실행된다. 서버와 연결되면 소켓을
    통해 read/write를 할 수 있다




Server                        Client
























n서버 소켓
      자바에서 네트워크 프로그래밍을 하기 위해서는 java.net 패키지를 이용한다.

  §서버프로그램을 만들 때는 소켓을 만들고, bind()하고 listen()하는 일들이 항상 반복된다.
  §자바에서는 이러한 반복 작업을 제거하기 위해서 서버 소켓(ServerSocket)이라는
    클래스를 만들었다.
  §프로그래머는 서버 소켓을 만들어서 accept() 메소드를 호출한다.
  §accept() 메소드는 클라이언트로부터 connection이 요청될 때까지 블록되었다가, 요청이
    들어오면 클라이언트와 통신할 수 있는 소켓을 생성해서 리턴해준다.
  §서버는 리턴된 소켓을 이용해서 클라이언트와 통신할 수 있다.
  §클라이언트에서도 마찬가지로 반복되는 작업을 제거하기 위해, connect()라는 함수를
    호출할 필요가 없도록 소켓(Socket)이라는 클래스를 만들었다.
  §따라서, 클라이언트에서는 소켓을 만들고, 소켓을 이용해서 만든 I/O 스트림을 이용해서
    서버와 통신할 수 있다.



서버                                 클라이언트
























⊙ 네트워크와 소켓
n클라이언트-서버 어플리케이션
   §연결 중심 프로토콜
     §클라이언트와 서버 사이에 전용의 링크가 설정된다.
     §두 프로세스 사이에서 전달되는 메시지는 정확한 순서대로 전달되는 것을 보장 받을 수 있다.
     §대부분의 네트워킹 어플리케이션은 신뢰할 수 있는 통신 프로토콜이 요구되므로
       연결 중심적이다.
     §예)TCP/IP의 TCP(Transfer Control Protocol)

   §비연결성 프로토콜
     §클라이언트와 서버사이에 전용선이 설정되지 않는다.
     §클라이언트와 서버는 메시지를 데이터그램 패킷(Datagram Packet)형태로 보내며,
       각각에는 목적지의 주소가 들어있다.
     §네트워크에서는 패킷이 들어있는 목적지의 주소를 해독한 후 이 패킷을 목적지로 보낸다.
     §각 패킷에는 핵심이 되는 메시지 외에도 송신자와 수신자에 대한 정보를 가지고 있다.
     §패킷의 전달을 보장받을 수 없다.
     §메시지의 전달 순서가 중요하지 않은 곳에서 사용될 수 있다.
     §예) 타임 서버 어플리케이션
           TCP/IP의 UDP


n인터넷 주소(Internet Address)
   §인터넷 ID - 인터넷에서의 네트워크를 지정한 것
   §Subnet ID - 지역 네트워크(서브넷)를 표현한것
   §Host ID - 서브넷에서 호스트에 대한 식별자
Internet ID        Subnet ID        Host ID        
203.248        255        2        



n왜 소켓이 필요한가?
   §어플리케이션과 네트워크 사이의 인터페이스를 위해 소켓이 필요하다.
   §클라이언트-서버 어플리케이션에서 대부분의 통신은 점-대-점(Point-to-Point),
     즉 통신의 끝점에 어플리케이션(클라이언트 또는 서버)이 존재하는 형태이다.
   §소켓은 단일 시스템 혹은 서로  다른 시스템에 존재하는 프로세스간 통신을 위해 끝점
     역할을 한다.
   §어플리케이션은 상대방에게 메시지를 보냄으로써 통신을 한다.
   §이 메시지는 네트워크에서 연속된 패킷으로 전달된다.
   §어플리케이션은 필요할 때 운영체제에게 소켓을 생성해달라는 요청을 한다.
   §시스템은 어플리케이션이 새로이 생성된 소켓을 참조하기 위해 사용할 수 있는
     정수(Small Integer) 형태의 소켓 식별자를 리턴한다.
n클래스와 인터페이스 설명
클래스/인터페이스        설명        
InetAddress ServerSocket Socket DatagramSocket DatagramPacket SocketImpl  SocketImplFactory        인터넷 주소 표현 서버 소켓. 소켓 작업을 위한 실제 구현에는 SocketImpl 클래스를 사용한다. 클라이언트 소켓. 소켓 작업을 위한 실제 구현에는 SocketImpl 클래스를 사용한다. 비연결성 프로토콜을 구현한 데이터그램 소켓. 전달되는 데이터와 목적지 호스트에 대한 상세 정보를 포함하고 있는 데이터그램 패킷 실제 구현을 위해서는 꼭 서브클래스화되어야 한다. ServerSocket과 Socket 클래스에 대한 실제 소켓 구현. 이 인터페이스에 정의되어 있는 실제 SocketImpl 인스턴스를 생성하기 위한 인터페이스        










⊙ Client/Server - Stream Socket 사용

nServer - 클라이언트로부터의 접속을 받아들이고, 클라이언트로 데이터(String)를 보내고,
           접속을 종료한다.


nClient - 서버로부터 보내진 정보를 읽고, 그 정보를 화면에 출력한다.










nServerSocket
  public ServerSocket(int port) throws IOException
  public ServerSocket(int port, int lisn_time) throws IOException  

  §Parameter
   §port        서버가 결합될 로컬 포트 번호
   §lisn_time        서버가 포트에서 접속을 기다릴 시간


□ Server
import java.io.*;
import java.net.*;
import java.awt.*;

public class Server extends Frame{
    TextArea display;

    public Server()
    {
        super("Server");
        display = new TextArea(20, 5);
        add("Center", display);
        resize(300, 150);
        show();
    }

    public void runServer()
    {
        ServerSocket server;
        Socket connection;
        OutputStream output;

        try {
             server = new ServerSocket(5000, 100);
             connection = server.accept();  // 클라이언트의 접속을 받아들인다.
             display.setText("Connection received...\n");
             display.appendText("Sending data...\n");
             output = connection.getOutputStream(); // 클라이언트로 데이터를 보낸다.
             String s = new String("Connection successful\n");
             for(int i = 0; i < s.length(); i++)
                 output.write( (int) s.charAt(i) );
             display.appendText("Transmission complete. Closing socket.\n");
             connection.close();     // 접속을 종료한다.
        } catch(IOException e){
             e.printStackTrace();
        }
    }

    public boolean handleEvent(Event e)
    {
        if(e.id == Event.WINDOW_DESTROY){
           hide();
           dispose();
           System.exit(0);
        }
        return super.handleEvent(e);
    }

    public static void main(String args[])
    {
        Server s = new Server();
        s.runServer();
    }
}  
nSocket
  public Socket(String host, int port) throws IOException;
  public Socket(String host, int port, boolean sock_type) throws IOException;
  public Socket(InetAddress inet, int port) throws IOException;
  public Socket(InetAddress inet, int port, boolean sock_type) throws IOException;

  §Parameter
   §host          접속할 호스트 머신 이름
   §port            서버가 결합될 로컬 포트 번호
   §sock_type  데이터그램 소켓인지 스트림 소켓인지를 나타내는 값
   §inet        접속할 호스트 머신의 InetAddress

ngetLocalHost()  로컬 호스트의 InetAddress를 구함



□ Client
import java.io.*;
import java.net.*;
import java.awt.*;

public class Client extends Frame{
    TextArea display;

    public Client()
    {
        super("Client");
        display = new TextArea(20, 20);
        add("Center", display);
        resize(300, 150);
        show();
    }
    public void runClient()
    {
        Socket client;
        InputStream input;

        try{
             client = new Socket(InetAddress.getLocalHost(),5000);
             display.appendText("Created Socket\n");

             input = client.getInputStream();  // 서버로부터 데이터를 받는다.
             display.appendText("Created input Stream\n");
             display.appendText("The text from the server is:\n\t");
             char c;

             // 서버로부터 받은 데이터를 개행이 될 때까지 읽어들인후, 문자로 형변환 한다.
             while((c = (char) input.read()) != '\n')  
                display.appendText(String.valueOf(c));  // 문자를 문자열로 출력한다.
                display.appendText("\n");
                client.close();   // 클라이언트를 종료한다.
        } catch(IOException e){
             e.printStackTrace();
        }
    }          

    public boolean handleEvent(Event e)
    {
        if(e.id == Event.WINDOW_DESTROY){
           hide();
           dispose();
           System.exit(0);
        }
        return super.handleEvent(e);
    }

    public static void main(String args[])
    {
        Client c = new Client();
        c.runClient();
    }
}












⊙ Client/Server - DatagramSocket/DatagramPacket





nDatagramSocket
  public DatagramSocket() throws SocketException;
  public DatagramSocket(int port) throws SocketException;

  §비연결성 프로토콜을 사용해 구현된 클라이언트-서버 어플리케이션에서 소켓을 형성한다.
  §클라이언트는 데이터그램 패킷을 생성할 때, 포트 번호를 지정함으로써 서버에 패킷을 보낸다.
  §이 클래스는 패킷을 처리하기 위한 send와 receive메소드를 가지고 있다.

  §Parameter
   §port       데이터그램 소켓이 결합된 로컬 포트 번호


nDatagramPacket
  public DatagramPacket(byte[] buffer, int length);
  public DatagramPacket(byte[] buffer, int length, InetAddress dest, int port);

  §비연결성 프로토콜을 사용해 구현된 클라이언트-서버 어플리케이션에서 패킷을 형성한다.
  §패킷은 DatagramSocket 클래스의 send 메소드를 사용하여 target에 전달된다.
  §DatagramSocket 클래스의 receive 메소드를 사용하여 패킷을 받아들인다.

  §Parameter
   §buffer            데이터를 포함하는 바이트 배열
   §length        데이터 버퍼의 길이
   §inetAddress       데이터그램을 받아들이는 IP 주소
   §port          데이터그램을 받아들이는 포트 번호


□ Server
import java.io.*;
import java.net.*;
import java.awt.*;

public class Server extends Frame{
    TextArea display;

    DatagramPacket sendPacket, receivePacket;
    DatagramSocket sendSocket, receiveSocket;

    public Server()
    {
        super("Server");
        display = new TextArea(20, 10);
        add("Center", display);
        resize(300, 150);
        show();

        try{
             sendSocket = new DatagramSocket();
             receiveSocket = new DatagramSocket(5000);
        } catch(SocketException se){
             se.printStackTrace();
             System.exit(1);
        }  
    }
    public void waitForPackets()
    {
        while(true){
           try{
             byte array[] = new byte[100];     // 패킷 설정
             receivePacket = new DatagramPacket(array, array.length);
             receiveSocket.receive(receivePacket);          // 패킷을 기다린다.
             display.appendText("\nPacket received:" +     // 패킷 프로세스
                                "\nFrom host: " + receivePacket.getAddress() +
                                "\nHost port: " + receivePacket.getPort() +
                                "\nLength: " + receivePacket.getLength() +
                                "\nContaining:\n\t");
             byte data[] = receivePacket.getData();
             String received = new String(data, 0);
             display.appendText(received);

             // 클라이언트에서 받은 패킷의 에코(echo) 정보를 다시 클라이언트로 돌려보낸다.
             display.appendText("\n\nEcho data to client...");
             sendPacket = new DatagramPacket(data, data.length,
                                               receivePacket.getAddress(), 5001);
             sendSocket.send(sendPacket);
             display.appendText("Packet sent\n");
           } catch(IOException e){
             display.appendText(e.toString() + "\n");
             e.printStackTrace();
           }
        }
    }

    public boolean handleEvent(Event e)
    {
        if(e.id == Event.WINDOW_DESTROY){
            hide();
            dispose();
            System.exit(0);
        }
        return super.handleEvent(e);
    }

    public static void main(String args[])
    {
        Server s = new Server();
        s.waitForPackets();
    }
}
















□ Client
import java.io.*;
import java.net.*;
import java.awt.*;

public class Client extends Frame{
    TextField enter;  
    TextArea display;
    Panel enterPanel;
    Label enterLabel;

    DatagramPacket sendPacket, receivePacket;
    DatagramSocket sendSocket, receiveSocket;

    public Client()
    {
        super("Client");
        enterPanel = new Panel();
        enterLabel = new Label("Enter message:");
        enter = new TextField(20);
        enterPanel.add(enterLabel);
        enterPanel.add(enter);
        add("North", enterPanel);
        display = new TextArea(20, 10);
        add("Center", display);
        resize(400, 300);
        show();

        try{
             sendSocket = new DatagramSocket();
             receiveSocket = new DatagramSocket(5001);
        } catch(SocketException se){
             se.printStackTrace();
             System.exit(1);
        }  
    }

    public void waitForPackets()
    {
        while(true){
           try{
             byte array[] = new byte[100];   // 패킷 설정
             receivePacket = new DatagramPacket(array, array.length);
             receiveSocket.receive(receivePacket);               // 패킷을 기다린다.
             display.appendText("\nPacket received:" +          // 패킷 프로세스
                                "\nFrom host: " + receivePacket.getAddress() +
                                "\nHost port: " + receivePacket.getPort() +
                                "\nLength: " + receivePacket.getLength() +
                                "\nContaining:\n\t");
             byte data[] = receivePacket.getData();
             String received = new String(data, 0);
             display.appendText(received);
           } catch(IOException e){
             display.appendText(e.toString() + "\n");
             e.printStackTrace();
           }
        }
    }

    public boolean handleEvent(Event e)
    {
        if(e.id == Event.WINDOW_DESTROY){
            hide();
            dispose();
            System.exit(0);
        }
        return super.handleEvent(e);
    }

    public boolean action(Event evt, Object o)
    {
        try{
             display.appendText("\nSending packet containing: " + o.toString() + "\n");
             String s = o.toString();
             byte data[] = new byte[100];
             s.getBytes(0, s.length(), data, 0);
             sendPacket = new DatagramPacket(data, s.length(),
                                               InetAddress.getLocalHost(), 5000);
             sendSocket.send(sendPacket);
             display.appendText("Packet sent\n");
        } catch(IOException e){
             display.appendText(e.toString() + "\n");
             e.printStackTrace();
        }            
        return true;
    }
    public static void main(String args[])
    {
        Client c = new Client();
        c.waitForPackets();
    }
}
⊙ 원격 호스트를 수행하는 네트웍 어플리케이션
n원리
  §알고 있는 포트를 인터넷 소켓으로 열려면 텔넷 포트처럼 원격 호스트의 수행을 알려야
    한다.
  §호스트 이름을 갖고 텍스트 필드를 사용해야 한다.
  §소켓을 열어야 한다.

n방법
  §java.net 패키지는 인터넷 소켓을 다루는 클래스를 포함하며, 이 클래스를 Socket이라
    부른다.
  §생성자는 호스트 이름과 포트 번호를 할당하기 위해 소켓을 정의한다.
  §호스트 이름은 string 형식이고, 포트 번호는 int 형태로 소켓을 열어 인스턴스를 선언한
    다음 소켓 생성자를 사용해 만든다.

































import java.awt.*;
import java.io.*;
import java.net.*;

/* 어플리케이션 클래스 */
public class Ping extends Frame implements Runnable{
   Socket socket;           /* 원격 호스트가 살아있는지 결정하는 Socket의 인스턴스 */
   TextField addrField;  /* 호스트 이름이 들어갈 텍스트 필드 */
   Button stopButton;       /* 정지 버튼 */
   TextArea content;          /* 원격 호스트의 상태를 출력하는 텍스트 영역 */
   Thread thread;       /* 소켓의 활동으로부터 사용자의 활동을 분리하는 데 사용하는 스레드 */

   int insertPos;              /* 텍스트 영역에서의 삽입 위치 */

   /* 사용자 인터페이스를 생성하는 생성자 */
   public Ping()
   {
       int i;
       setTitle("Ping");
       setLayout(new BorderLayout());
       addrField = new TextField("", 20);
       stopButton = new Button("Stop");
       content = new TextArea("", 24, 80);
       content.setEditable(false);
       insertPos = 0;
       Panel p = new Panel();
       p.setLayout(new FlowLayout());
       p.add(addrField);
       p.add(stopButton);
       add("North", p);
       add("Center", content);
       thread = new Thread(this);
       resize(400, 300);
       show();
   }
  
   /* 액션 이벤트를 다룬다.
    * 키가 눌려지는 상태에 따라 소켓 스레드를 열고
    * 정지 버튼이 눌려지면 소켓 스레드가 정지하는 상태를 반환
    * @param evt - 이벤트 객체
    * @param obj - 이벤트가 받는 객체
    */
   public boolean action(Event evt, Object obj)
   {
      if(evt.target == addrField) {
         thread.stop();
         thread = new Thread(this);
         thread.start();
         return true;
      }
      if(evt.target == stopButton) {
         thread.stop();
      }
      return false;
   }
   /* 소켓을 여는 스레드
    * 텔넷 포트(23) 열기를 시도한다.
    */
   public void run()
   {
       String name;
       name = addrField.getText();
          try{
            try{
                 socket = new Socket(name, 23);
            } catch(UnknownHostException e) {
              insertString(name + " : unknown host\n");
              return;
            }
          }catch(IOException e2){
              insertString("Unable to open socket\n");
              return;
          }
              insertString(name + " is alive\n");
              try{
                   socket.close();
          }catch(IOException e2) {
              insertString("IOException closing socket\n");
              return;
          }
   }

   /* 텍스트 영역 끝에 텍스트를 더하는 데 필요한 메소드
    * @param s - 더할 텍스트
    */
   void insertString(String s)
   {
       content.insertText(s, insertPos);
       insertPos += s.length();
   }

   /* 어플리케이션의 시작점
    * @param args - 명령행 인자
    */
   public static void main(String args[])
   {
       new Ping();
   }
}

ninsertText(String, int)
  public void insertText(String ins_text, int index);
  public abstract void insertText(String txt, int pos);

§Parameter
  §ins_text       지정된 인덱스에 삽입될 텍스트
  §txt            TextArea 객체에 삽입될 텍스트
  §index/pos      새로운 텍스트가 삽입될 위치
⊙ HTTP로 데이터 받기
n원리
  §텍스트 필드 안에 URL이 들어가고, 편집할 수 없는 텍스트 영역 안에 URL로부터 받아온
    문서를 나타내어야 한다.

n방법
  §URL 연결을 URL 클래스 안에 있는 openConnection() 메소드에 의해 만들어진다.
  §URLConnection과 연결된 입력 스트림은 GetInputStream() 메소드에 의해 검색된다.
    ( 데이터는 DataInputStream 클래스 안에 있는 메소드를 사용해서 데이터 입력 스트림을
      읽어들인다.)
  §분리된 스레드는 사용자 입력에 의해 하나의 스트림으로 활동하게 되므로 데이터를
    비동기적으로 읽을 수 있다.
  §사용자가 Stop 버튼을 누르면 스트림 활동이 종결된다.



































import java.awt.*;
import java.io.*;
import java.net.*;

/* 어플리케이션 클래스 */
public class ViewSource extends Frame implements Runnable{
    String s;
    URL u;
    URLConnection uc;         /* 연결될 URL */
    TextField location;     /* URL이 입력될 TextField */
    TextArea content;      /* 문장의 소스를 보여주는 텍스트 영역 */
    Thread thread;         /* 문서를 읽기 위해 사용되는 분리된 스레드 */
    int insertPos = 0;             /* 내용 영역의 삽입 위치 */

    /* 사용자 인터페이스를 생성하는 생성자 */
    public ViewSource()
    {
        int i;
        setTitle("View Source");
        setLayout(new BorderLayout());
        location = new TextField("", 20);
        content = new TextArea("", 24, 80);
        content.setEditable(false);
        Panel p = new Panel();
        p.setLayout(new FlowLayout());
        p.add(location);
        p.add(new Button("Stop"));
        add("North", p);
        add("Center", content);
        thread = new Thread(this);
        resize(400, 300);
        show();
    }

    /* 키가 눌려지는 것과 정지 버튼
     * @param e - 이벤트 객체
     */
    public boolean handleEvent(Event e)
    {
        if((e.target instanceof TextField) && (e.id == Event.ACTION_EVENT)){
             thread.stop();
             content.replaceText("", 0, insertPos);
             thread = new Thread(this);
             thread.start();
             return true;
        }
        if((e.target instanceof Button) && (e.id == Event.ACTION_EVENT)){
             thread.stop();
             return true;
        }
         return false;
    }

    /* URL로부터 데이터를 읽고 내용 영역에 표시하는 메소드 */
    public void run()
    {
        try{
              u = new URL(location.getText());
        }catch(MalformedURLException e) {
        }
        try{
              uc = u.openConnection();
        }catch(IOException e){
        }
        DataInputStream in = null;
        try{
              in = new DataInputStream(new BufferedInputStream(uc.getInputStream()));
        }catch(IOException e){
        }
        String line;
        insertPos = 0;
        try{
              while((line = in.readLine()) != null)
              {
                 line += "\n";
                 content.insertText(line, insertPos);
                 insertPos += line.length();
              }
        }catch(IOException e){
         System.out.println("Error in reading file");
        }
    }

    /* 어플리케이션이 시작되는 곳
     * @param args - 명령행 인자
     */
    public static void main(String args[])
    {
        new ViewSource();
    }                  
}

nreplaceText(String, int, int)
  public void replaceText(String new_text, int start, int end);

  §parameter
   §new_text   지정된 위치에 텍스트를 교체할 새로운 텍스트
   §start        새로운 텍스트를 교체할 곳의 시작 위치
   §end               새로운 텍스트를 교체할 곳의 마지막 위치

nopenConnection()           URL 객체에 의해 참조되는 객체로의 연결을 연다.

ngetInputStream()
  §클라이언트 소켓에 대한 InputStream을 리턴
  §클라이언트는 이 스트림을 사용하여 서버로부터 데이터를 받는다.

  Hit : 14036     Date : 2004/12/14 11:57



    
netwow1 네트워크통신관련부가 올려씁니다 2004/12/14  
janeeyoon 뭔소리여..-- 2004/12/14  
netwow1 못배우시나 왜말없찌 2004/12/14  
netwow1 바보네 컴맹 데이터베이스도모르는대 카카카카 2004/12/14  
     [공지]해커스쿨 이용수칙 2021/04/11 수정판 [55] 한승재 01/05 12831
22018   카타고 AI[1]     해킹잘하고싶다
10/01 63
22017   시스코 라우터랑 스위치 케이블 장비 질문이에요.[1]     해킹잘하고싶다
09/22 127
22016   ㅇㅅㅇ     해킹잘하고싶다
08/15 297
22015   요즘 하고 있는 거     해킹잘하고싶다
07/13 517
22014   2위 ㅇㅅㅇ     해킹잘하고싶다
07/13 447
22013   ...     해킹잘하고싶다
03/31 836
22012   ...     해킹잘하고싶다
03/25 819
22011   15년전쯤 이 사이트 보고 꿈을 정했었는데~~~[1]     ambition65
03/20 1223
22010   으앙!!![1]     해킹잘하고싶다
02/05 957
22009   오랜만~     DarkSlayer
12/11 1158
22008   해커스쿨 옛날 BGM[1]     wkfhddl4041
11/07 1264
22007   히잉...     해킹잘하고싶다
11/02 1085
22006   바둑과 장기     해킹잘하고싶다
10/30 1172
22005   나는 언제 애인이 생기나욤...     해킹잘하고싶다
10/27 1250
22004   전국 1위     해킹잘하고싶다
10/27 1194
22003   담배 ㅋㅋ[1]     해킹잘하고싶다
10/27 1198
22002   매트릭스의 파란약을 아십니까..?     해킹잘하고싶다
10/27 1157
22001   ㅇㅇ[1]     해킹잘하고싶다
10/20 1123
22000   옵치 핵감지 프로그램좀 만들어주세요[1]     powerima
10/15 1246
1 [2][3][4][5][6][7][8][9][10]..[1101]

Copyright 1999-2026 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org