Page 636 - 3-2
P. 636

dout = new DataOutputStream( sock.getOutputStream() ); // WRITE,    서버로 보내고자하 하는 신호
            // STREAM   연결


            System.out.println( "***************  접속성공! ***************" );


            //  서버로부터 정수형 값을 받는과정
            // recv_int = read.readInt();
            // System.out.println(" 서버왈: " + recv_int);


            while( true )
            {
            //  서버에게 문자열 값을 전달하는과정
            System.out.print( " 송신할 프로토콜: " );
            send_str = in.readLine();


            try
            {
            dout.writeUTF( send_str );      // 여기가 서버로 보내는거
            }
            catch( Exception e )
            {
                    e.printStackTrace();
            }
            //  결과 받기
            try
            {
            recv_str = din.readUTF();
            }
            catch( Exception e )
            {
                    e.printStackTrace();
            }
            System.out.println( " 결과값: " + recv_str );
            }
            }
            catch( IOException e )
            {
            e.printStackTrace();
            }
            }
            }


            // 출처: http://850530.tistory.com/18 [ 베짱2]
            */




                                                         - 636 -
   631   632   633   634   635   636   637   638   639   640   641