개요

Size: px
Start display at page:

Download "개요"

Transcription

1 ( 분산통신실습 1) : 소켓 (Sockets) 소켓 : 저수준패킷스트림전송 유닉스소켓 (cseunix.incheon.ac.kr 에서프로그램 ) inettime 소스코드참조 ( 실습 ) 시간을 10회반복하여출력하도록프로그램을수정하세요. ( 과제 1-1) 유닉스채팅프로그램채팅서버가임의의클라이언트가채팅에참가하는요청을하면이를채팅참가자리스트에추가하며채팅에참가하고있는클라이언트들이보내오는메시지를모든채팅참가자에게다시방송하는기능을수행해주는 chat_server.c와 chat_client.c 인터넷채팅프로그램을실행하고분석해보고, 이채팅프로그램에채팅참가자목록을보여주는?who 명령을추가하세요. 자바소켓 시간 (Time-of-Day) 서버소스코드참조 ( 실습a) 시간을 10회반복하여출력하도록프로그램을수정하세요. ( 실습b) 유닉스 inettime 클라이언트와혼합해서 inettime 서비스를실행해보세요. ( 과제 1-2) 자바응용채팅프로그램 JavaChatServer.java와 JavaChatClient.java 및 JavaChatClient.html 자바애플릿채팅프로그램을 inettime과같은자바응용채팅프로그램으로수정하세요. 윈도우소켓 (winsock) ( 실습 ) 유닉스소켓 chat 프로그램을윈도우소켓 chat 프로그램으로변경하세요. ( 과제1-3) 윈도우소켓talk프로그램유닉스 talk 프로그램의 winsock 버전을작성하세요. 의 Information의 Unix의 Socket Programming 참조 1.1

2 Sockets host X ( ) socket ( /1625) web server ( ) socket ( /80) 1.2

3 inettime.c: 인터네트시간청취 #include <stdio.h> #include <signal.h> #include <ctype.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> /* For AFINET sockets */ #include <arpa/inet.h> #include <netdb.h> #define DAYTIME_PORT 13 /* Standard port no */ #define DEFAULT_PROTOCOL 0 unsigned long promptforinetaddress (); unsigned long nametoaddr (); main () int clientfd; /* Client socket file descriptor */ int serverlen; /* Length of server address structure */ int result; /* From connect () call */ struct sockaddr_in serverinetaddress; /* Server address */ struct sockaddr* serversockaddrptr; /* Pointer to address */ unsigned long inetaddress; /* 32-bit IP address */ /* Set the two server variables */ serversockaddrptr = (struct sockaddr*) &serverinetaddress; 1.3

4 inettime.c: 인터네트시간청취 (cont.) serverlen = sizeof (serverinetaddress); /* Length of address */ while (1) /* Loop until break */ inetaddress = promptforinetaddress (); /* Get 32-bit IP */ if (inetaddress == 0) break; /* Done */ /* Start by zeroing out the entire address structure */ bzero ((char*)&serverinetaddress,sizeof(serverinetaddress)); serverinetaddress.sin_family = AF_INET; /* Use Internet */ serverinetaddress.sin_addr.s_addr = inetaddress; /* IP */ serverinetaddress.sin_port = htons (DAYTIME_PORT); /* Now create the client socket */ clientfd = socket (AF_INET, SOCK_STREAM, DEFAULT_PROTOCOL); do /* Loop until a connection is made with the server */ result = connect (clientfd,serversockaddrptr,serverlen); if (result == -1) sleep (1); /* Try again in 1 second */ while (result == -1); readtime (clientfd); /* Read the time from the server */ close (clientfd); /* Close the socket */ exit (/* EXIT_SUCCESS */ 0); 1.4

5 inettime.c: 인터네트시간청취 (cont.) unsigned long promptforinetaddress () char hostname [100]; /* Name from user: numeric or symbolic */ unsigned long inetaddress; /* 32-bit IP format */ /* Loop until quit or a legal name is entered */ /* If quit, return 0 else return host's IP address */ do printf ("Host name (q = quit, s = self): "); scanf ("%s", hostname); /* Get name from keyboard */ if (strcmp (hostname, "q") == 0) return (0); /* Quit */ inetaddress = nametoaddr (hostname); /* Convert to IP */ if (inetaddress == 0) printf ("Host name not found n"); while (inetaddress == 0); unsigned long nametoaddr (name) char* name; char hostname [100]; struct hostent* hoststruct; /* /usr/include/netdb.h */ struct in_addr* hostnode; /* Convert name into a 32-bit IP address */ /* If name begins with a digit, assume it's a valid numeric */ /* Internet address of the form A.B.C.D and convert directly */ if (isdigit (name[0])) return (inet_addr (name)); 1.5

6 inettime.c: 인터네트시간청취 (cont.) if (strcmp (name, "s") == 0) /* Get host name from database */ gethostname (hostname,100); printf ("Self host name is %s n", hostname); else /* Assume name is a valid symbolic host name */ strcpy (hostname, name); /* Now obtain address information from database */ hoststruct = gethostbyname (hostname); if (hoststruct == NULL) return (0); /* Not Found */ /* Extract the IP Address from the hostent structure */ hostnode = (struct in_addr*) hoststruct->h_addr; /* Display a readable version for fun */ printf ("Internet Address = %s n", inet_ntoa (*hostnode)); return (hostnode->s_addr); /* Return IP address */ readtime (fd) int fd; char str [200]; /* Line buffer */ printf ("The time on the target port is "); while (readline (fd, str)) /* Read lines until end-of-input */ printf ("%s n", str); /* Echo line from server to user */ 1.6

7 inettime.c: 인터네트시간청취 (cont.) readline (fd, str) int fd; char* str; /* Read a single NEWLINE-terminated line */ int n; do /* Read characters until NULL or end-of-input */ n = read (fd, str, 1); /* Read one character */ while (n > 0 && *str++!= ' n'); return (n > 0); /* Return false if end-of-input */ 1.7

8 Time-of-Day: Server.java import java.net.*; public class Server public Server() // create the socket the server will listen to try s = new ServerSocket(5155); catch (java.io.ioexception e) System.out.println(e); System.exit(1); // OK, now listen for connections System.out.println("Server is listening..."); try while (true) client = s.accept(); // create a separate thread // to service the request c = new Connection(client); c.start(); catch (java.io.ioexception e) System.out.println(e); public static void main(string args[]) Server timeofdayserver = new Server(); private ServerSocket s; private Socket client; private Connection c; 1.8

9 Time-of-Day: Connection.java import java.net.*; import java.io.*; public class Connection extends Thread public Connection(Socket s) outputline = s; public void run() // getoutputstream returns an OutputStream object // allowing ordinary file IO over the socket. try // create a new PrintWriter with automatic flushing PrintWriter pout = new PrintWriter(outputLine.getOutputStream(), true); // now send a message to the client pout.println("the Date and Time is " + new java.util.date().tostring()); try Thread.sleep(1500); catch (Exception e) private Socket // now close the socket outputline.close(); catch (java.io.ioexception e) System.out.println(e); outputline; 1.9

10 Time-of-Day: Client.java import java.net.*; import java.io.*; public class Client public Client() try Socket s = new Socket(" ",5155); InputStream in = s.getinputstream(); BufferedReader bin = new BufferedReader(new InputStreamReader(in)); System.out.println(bin.readLine()); s.close(); catch (java.io.ioexception e) System.out.println(e); System.exit(1); public static void main(string args[]) Client client = new Client(); 1.10

11 talk & chat Winsock versions 윈도우소켓 (Window socket) 은유닉스에서사용되는 BSD 소켓을계승하기때문에윈속에서사용되는대부분의함수와구조체는유닉스버전과동일하다. 그러나윈속을사용하기전에유닉스와달리윈속라이브러리를초기화해주고사용이끝나면해제를시켜줘야한다. 초기화 : WSAStartup, 해제 : WSACleanup talk_client, talk_server 유닉스버전 : 키보드입력과데이터수신처리를 fork 를이용해서분기 윈도우버전 : 키보드입력은메인에서, 데이터수신처리는쓰레드를이용 chat_client, chat_server 유닉스버전 : select 를사용하여데이터 I/O 를비동기적으로처리, 키보드입력은 fork 를이용 윈도우버전 : I/O 방식은쓰레드에서 select 를사용, 키보드입력은메인에서처리 1.11

12 ( 분산통신실습 2) RMI RMI 익히기 1. 분산환경에서동작하는 message-passing 을이용한 boundedbuffer 해법프로그램을실행해보세요. 소스코드 : ftp:// > os -> OSJavaSources -> ch15 -> rmi el.incheon.ac.kr 의 Information Unix RMI 참조 2. 또, 이예제가웹상에서수행될수있도록수정해보세요. 즉클라이언트프로그램에서이예제의 Producer 와 Consumer 의동작을모니터링하는 Java applet 을작성해보는것입니다. Appletviewer 또는넷스케이프커뮤니케이터로실행 3. BONUS: Java synchronization 을이용한 bounded-buffer 해법 ( 운영체제교재 Applied Operating System Concepts 7 장 p209 참조 ) 이분산환경에서도동작할수있도록 RMI 를이용하여수정해보세요. 실습방법 cseblade.incheon.ac.kr( ) 의 /mysung/2003osreport 디렉토리에자기학번디렉토리를만들고소스프로그램과실행파일을옮겨놓으세요. 1.12

13 RMI (Remote Method Invocation) RPC 의 Java 버전 저수준 (low-level) 소켓을이용하지않고원격객체의메소드를호출할수있는방법을제공하는객체지향언어인 Java 기반의분산컴퓨팅환경 ( 클라이언트 / 서버지원 ) 을위한미들웨어 (RPC 와유사 ) 스레드 (thread) 가원격객체 (Remote Object) 의메소드 (method) 호출 다른 Java Virtual Machine 상에있는객체는 원격 객체 RPC 보다좋은점 객체지향적이다. 프로그램작성및사용이쉽다. 안전하고보안성이있다. 기존시스템과통합해서사용할수있다. 작성절차 원격인터페이스를정의한다. 원격인터페이스를구현 (implement) 하는원격객체 ( 서버 ) 를작성한다. 원격객체를이용하는프로그램 ( 클라이언트 ) 을작성한다. stub 와 skeleton 클래스를생성한다. rmiregistry 를실행시킨다. 서버와클라이언트를실행시킨다. 1.13

14 RMI (Remote Method Invocation) 1.14

15 RMI (Remote Method Invocation) RPC versus RMI RPC : Procedural Programming Style RMI : Object-Oriented Programming Style RPC 의매개변수 : Ordinary Data Structures RMI 의매개변수 : Objects Stubs and Skeletons Stub 클라이언트에상주하는원격객체의대리인 (proxy) 매개변수들을 Marshalls ( 메소드이름과인자들의꾸러미생성 ) 해서서버로보냄 Skeleton 서버에상주 매개변수를 Unmarshalls 해서서버에전달함 매개변수 Marshall 된매개변수가 Local (Non-Remote) Objects 이면객체를바이트스트림으로기록해주는객체순서화 (Object Serialization) 기법을이용해서복사에의해 (by Value) 전달 Marshall 된매개변수가 Remote Objects 이면참조에의해 (by Reference) 전달 : RMI 의장점 Remote objects java.rmi.remote 를확장한 Interface 로선언되어야함 extends java.rmi.remote 모든메소드는 java.rmi.remoteexception 을발생시켜야함 throws java.rmi.remoteexception 1.15

16 Marshalling Parameters 1.16

17 RMI 프로그램예제 원격인터페이스구현 MessageQueueImpl.java MessageQueue.java javac server MessageQueueImpl.class MessageQueueImpl_skel.class rmic MessageQueueImpl_stub.class Factory.java Producer.java Consumer.java javac Factory.class client 1.17

18 구성 RMI 프로그램예제 원격인터페이스 : MessageQueue.java 서버프로그램 : MessageQueueImpl.java 클라이언트프로그램 : Factory.java, Producer.java, Consumer.java Policy File : New with Java 2 grant ; permission java.net.socketpermission "*: ","connect,accept"; 1.18

19 RMI 프로그램예제 실행순서 1. 모든소스파일컴파일 # javac MessageQueue.java MessageQueueImpl.java Factory.java Producer.java Consumer.java 2. rmic 로 stub 와 skeleton class 파일생성 # rmic MessageQueueImpl 3. 레지스트리서비스시작 (rmiregistry) osagent 또는 rpcbind 디몬에해당 # rmiregistry & (Unix) 또는 C: > start rmiregistry (Windows) 4. 원격서버객체의인스턴스생성 (JDK 1.2 이상버전에서는인증해주어야함 ) # java -Djava.security.policy=java.policy MessageQueueImpl (JDK 1.2 이상 ) 또는 # java MessgeQueueImpl (JDK 1.1) 5. 클라이언트에서원격객체실행시작 # java -Djava.security.policy=java.policy Factory (JDK.2 이상 ) 또는 # java Factory (JDK 1.1) 1.19

20 RMI 프로그램예제 서버 : MessageQueue interface import java.util.*; import java.rmi.*; public interface MessageQueue extends java.rmi.remote /* * This implements a non-blocking send */ public void send(object item) throws java.rmi.remoteexception; /* * This implements a non-blocking receive */ public Object receive() throws java.rmi.remoteexception; 1.20

21 RMI 프로그램예제 서버 : MessageQueueImpl.java (1) import java.util.*; import java.rmi.*; public class MessageQueueImpl extends java.rmi.server.unicastremoteobject implements MessageQueue public MessageQueueImpl() throws RemoteException queue = new Vector(); // This implements a non-blocking send public synchronized void send(object item) throws RemoteException queue.addelement(item); System.out.println("Producer entered " + item + " size = " + queue.size()); 1.21

22 RMI 프로그램예제 서버 : MessageQueueImpl.java (2) // This implements a non-blocking receive public synchronized Object receive() throws RemoteException Object item; if (queue.size() == 0) return null; else item = queue.firstelement(); queue.removeelementat(0); System.out.println("Consumer removed " + item + " size = " + queue.size()); return item; 1.22

23 RMI 프로그램예제 서버 : MessageQueueImpl.java (3) public static void main(string args[]) System.setSecurityManager(new RMISecurityManager()); try MessageQueue server = new MessageQueueImpl(); Naming.rebind("// /MessageServer", server); //Naming.rebind("rmi://media.inchon.ac.kr/MessageServer", server); System.out.println("Server Bound"); catch(exception e) System.err.println(e); private Vector queue; 1.23

24 RMI 프로그램예제 클라이언트 : Factory.java (1) import java.util.*; import java.rmi.*; public class Factory public Factory() // remote object MessageQueue mailbox; System.setSecurityManager(new RMISecurityManager()); // install a security manager try //get a reference to the remote object mailbox = (MessageQueue)Naming.lookup( // /MessageServer"); //(MessageQueue)Naming.lookup("rmi://media.inchon.ac.kr/MessageServer"); // now create the producer and consumer threads Producer producerthread = new Producer(mailBox); Consumer consumerthread = new Consumer(mailBox); producerthread.start(); consumerthread.start(); catch (Exception e) System.err.println(e); 1.24

25 RMI 프로그램예제 클라이언트 : Factory.java (2) // producer and consumer will call this to nap public static void napping() int sleeptime = (int) (NAP_TIME * Math.random() ); try Thread.sleep(sleepTime*1000); catch(interruptedexception e) public static void main(string args[]) Factory client = new Factory(); private static final int NAP_TIME = 5; 1.25

26 RMI 프로그램예제 클라이언트 : Producer.java import java.util.*; class Producer extends Thread public Producer(MessageQueue m) mbox = m; public void run() Date message; while (true) Factory.napping(); // produce an item & enter it into the buffer message = new Date(); try mbox.send(message); System.out.println( Producer Produced + message); catch (Exception e) System.err.println(e); private MessageQueue mbox; 1.26

27 RMI 프로그램예제 클라이언트 : Consumer.java import java.util.*; class Consumer extends Thread public Consumer(MessageQueue m) mbox = m; public void run() Date message; while (true) Factory.napping(); // consume an item from the buffer try message = (Date)mbox.receive(); if (message!= null) // Consume the item System.out.println( Consumer Consumed + message); catch (Exception e) System.err.println(e); private MessageQueue mbox; 1.27

Microsoft PowerPoint - RMI.ppt

Microsoft PowerPoint - RMI.ppt ( 분산통신실습 ) RMI RMI 익히기 1. 분산환경에서동작하는 message-passing을이용한 boundedbuffer 해법프로그램을실행해보세요. 소스코드 : ftp://211.119.245.153 -> os -> OSJavaSources -> ch15 -> rmi http://marvel el.incheon.ac.kr의 Information Unix

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

Network Programming

Network Programming Part 5 확장된 Network Programming 기술 1. Remote Procedure Call 2. Remote Method Invocation 3. Object Request Broker 2. Java RMI

More information

Chap12

Chap12 12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드]

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드] - Socket Programming in Java - 목차 소켓소개 자바에서의 TCP 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 Q/A 에코프로그램 - EchoServer 에코프로그램 - EchoClient TCP Programming 1 소켓소개 IP, Port, and Socket 포트 (Port): 전송계층에서통신을수행하는응용프로그램을찾기위한주소

More information

Microsoft PowerPoint - 03-TCP Programming.ppt

Microsoft PowerPoint - 03-TCP Programming.ppt Chapter 3. - Socket in Java - 목차 소켓소개 자바에서의 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 에코프로그램 - EchoServer 에코프로그램 - EchoClient Q/A 1 1 소켓소개 IP,, and Socket 포트 (): 전송계층에서통신을수행하는응용프로그램을찾기위한주소 소켓 (Socket):

More information

자바-11장N'1-502

자바-11장N'1-502 C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 소켓 2 1 소켓 클라이언트 - 서버모델 네트워크응용프로그램 클리이언트 - 서버모델을기반으로동작한다. 클라이언트 - 서버모델 하나의서버프로세스와여러개의클라이언트로구성된다. 서버는어떤자원을관리하고클라이언트를위해자원관련서비스를제공한다. 3 소켓의종류 소켓 네트워크에대한사용자수준의인터페이스를제공 소켓은양방향통신방법으로클라이언트 - 서버모델을기반으로프로세스사이의통신에매우적합하다.

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

(Microsoft PowerPoint - Chapter17 RMI.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - Chapter17 RMI.ppt [\310\243\310\257 \270\360\265\345]) Chapter 17. RMI Mingyu Lim Collaborative Computing Systems Lab, School of Internet & Multimedia Engineering Konkuk University, Seoul, Korea 학습목표 RMI란 RMI 구조 RMI는어떻게동작하는가 로컬객체를원격객체로변경하기 RMI를이용한계산기애플리케이션

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

More information

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 25 장네트워크프로그래밍 이번장에서학습할내용 네트워크프로그래밍의개요 URL 클래스 TCP를이용한통신 TCP를이용한서버제작 TCP를이용한클라이언트제작 UDP 를이용한통신 자바를이용하여서 TCP/IP 통신을이용하는응응프로그램을작성하여봅시다. 서버와클라이언트 서버 (Server): 사용자들에게서비스를제공하는컴퓨터 클라이언트 (Client):

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 소켓프로그래밍활용 IT CookBook, 유닉스시스템프로그래밍 학습목표 소켓인터페이스를활용한다양한프로그램을작성할수있다. 2/23 목차 TCP 기반프로그래밍 반복서버 동시동작서버 동시동작서버-exec함수사용하기 동시동작서버-명령행인자로소켓기술자전달하기 UDP 프로그래밍 3/23 TCP 기반프로그래밍 반복서버 데몬프로세스가직접모든클라이언트의요청을차례로처리 동시동작서버

More information

10. 시스템 프로그래밍

10.  시스템 프로그래밍 네트워크프로그래밍 Unix Network Programming, 2nd Ed., W. Richard Stevens, Prentice Hall PTR, 1999. 한국어판 Unix Network Programming, Stevens 저, 김치하, 이재용역, 대영사, 1991. 컴퓨터네트워크프로그래밍, 개정판, 김화종, 홍릉과학출판사, 2000. 10.7 소켓

More information

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

Microsoft PowerPoint os4.ppt

Microsoft PowerPoint os4.ppt 제 2 부프로세스관리 (Process Management) 프로세스» 실행중인프로그램 (program in execution) CPU time, memory, files, I/O devices 등자원요구» 시스템의작업단위 (the unit of work)» 종류 1. 사용자프로세스 (user process) - user code 실행 2. 시스템프로세스 (system

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

Microsoft PowerPoint - Supplement-02-Socket Overview.ppt [호환 모드]

Microsoft PowerPoint - Supplement-02-Socket Overview.ppt [호환 모드] 소켓개요 참고문헌 : 컴퓨터네트워크프로그래밍, 김화종, 홍릉과학출판사 Socket 정의 Socket 은 Transport 계층 (TCP 나 UDP) 을이용하는 API 1982 년 BSD 유닉스 41 에서처음소개 윈도우즈의경우 Winsock 제공 JAVA 또한 Socket 프로그래밍을위한클래스제공 Socket Interface 의위치 5-7 (Ses, Pre,

More information

Microsoft PowerPoint UnixNetProg.ppt [호환 모드]

Microsoft PowerPoint UnixNetProg.ppt [호환 모드] 유닉스네트워크프로그래밍 Unix Network Programming, 2nd Ed., W. Richard Stevens, Prentice Hall PTR, 1999. 한국어판 Unix Network Programming, 2nd Ed., W. Richard Stevens 저, 김치하, 이재용편역, 교보문고, 1999. 컴퓨터네트워크프로그래밍, 개정판, 김화종,

More information

Microsoft PowerPoint - UnixNetProg.ppt [호환 모드]

Microsoft PowerPoint - UnixNetProg.ppt [호환 모드] 유닉스네트워크프로그래밍 Unix Network Programming, 2nd Ed., W. Richard Stevens, Prentice Hall PTR, 1999. 한국어판 Unix Network Programming, 2nd Ed., W. Richard Stevens 저, 김치하, 이재용편역, 교보문고, 1999. 컴퓨터네트워크프로그래밍, 개정판, 김화종,

More information

Microsoft PowerPoint os5.ppt

Microsoft PowerPoint os5.ppt 5 장스레드 (Threads) 프로세스 = 자원 + PC 스레드 : 새 PC (a thread of control) 로같은 address space 를실행하는 fork 와유사 스레드 (Threads) 개요 ~ 경량프로세스 (LWP; lightweight process) = 스레드» CPU 를이용하는기본단위» thread ID, PC, 레지스터세트, 스택영역을가짐»

More information

Chap7.PDF

Chap7.PDF Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

Microsoft PowerPoint - Lecture_Note_5.ppt [Compatibility Mode]

Microsoft PowerPoint - Lecture_Note_5.ppt [Compatibility Mode] TCP Server/Client Department of Computer Engineering Kyung Hee University. Choong Seon Hong 1 TCP Server Program Procedure TCP Server socket() bind() 소켓생성 소켓번호와소켓주소의결합 listen() accept() read() 서비스처리, write()

More information

<4D F736F F F696E74202D E20B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D62E >

<4D F736F F F696E74202D E20B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D62E > 웹프로그래밍및실습 ( g & Practice) 문양세강원대학교 IT 대학컴퓨터과학전공 소켓 (Socket) (1/2) Socket 이란? 서버와클라이언트가서로특정한규약을사용하여데이터를전송하기위한방식 서버와클라이언트는소켓연결을기다렸다가소켓이연결되면서로데이터를전송 현재네트워크상에서의모든통신의근간은 Socket 이라할수있음 Page 2 1 소켓 (Socket) (2/2)

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 13 장소켓 2 13.1 소켓 클라이언트 - 서버모델 네트워크응용프로그램 클리이언트 - 서버모델을기반으로동작한다. 클라이언트 - 서버모델 하나의서버프로세스와여러개의클라이언트로구성된다. 서버는어떤자원을관리하고클라이언트를위해자원관련서비스를제공한다. 3 소켓의종류 소켓 네트워크에대한사용자수준의인터페이스를제공 소켓은양방향통신방법으로클라이언트 - 서버모델을기반으로프로세스사이의통신에매우적합하다.

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 8 장클래스와객체 I 이번장에서학습할내용 클래스와객체 객체의일생직접 메소드클래스를 필드작성해 UML 봅시다. QUIZ 1. 객체는 속성과 동작을가지고있다. 2. 자동차가객체라면클래스는 설계도이다. 먼저앞장에서학습한클래스와객체의개념을복습해봅시다. 클래스의구성 클래스 (class) 는객체의설계도라할수있다. 클래스는필드와메소드로이루어진다.

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

vi 사용법

vi 사용법 네트워크프로그래밍 6 장과제샘플코드 - 1:1 채팅 (udp 버전 ) 과제 서버에서먼저 bind 하고그포트를다른사람에게알려줄것 클라이언트에서알려준포트로접속 서로간에키보드입력을받아상대방에게메시지전송 2 Makefile 1 SRC_DIR =../../common 2 COM_OBJS = $(SRC_DIR)/addressUtility.o $(SRC_DIR)/dieWithMessage.o

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

13-Java Network Programming

13-Java Network Programming JAVA Programming Language JAVA Network Programming IP Address(Internet Protocol Address) URL(Uniform Resource Location) TCP(Transmission Control Protocol) Socket UDP(User Datagram Protocol) Client / Server

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 24 장입출력 이번장에서학습할내용 스트림이란? 스트림의분류 바이트스트림 문자스트림 형식입출력 명령어행에서입출력 파일입출력 스트림을이용한입출력에대하여살펴봅시다. 스트림 (stream) 스트림 (stream) 은 순서가있는데이터의연속적인흐름 이다. 스트림은입출력을물의흐름처럼간주하는것이다. 스트림들은연결될수있다. 중간점검문제 1. 자바에서는입출력을무엇이라고추상화하는가?

More information

Microsoft PowerPoint os3.ppt [호환 모드]

Microsoft PowerPoint os3.ppt [호환 모드] 제2 부프로세스관리 (Process Management) 프로세스» 실행중인프로그램 (program in execution) CPU time, memory, files, I/O devices 등자원요구» 시스템의작업단위 (the unit of work)» 종류 1. 사용자프로세스 (user process) - user code 실행 2. 시스템프로세스 (system

More information

JAVA PROGRAMMING 실습 08.다형성

JAVA PROGRAMMING 실습 08.다형성 2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스

More information

Microsoft PowerPoint os5.ppt [호환 모드]

Microsoft PowerPoint os5.ppt [호환 모드] 5 장스레드 (Threads) 프로세스 = 자원 + PC 스레드 : 새 PC (a thread of control) 로같은 address space 를실행하는 fork 와유사 스레드 (Threads) 개요 경량프로세스 (LWP; lightweight process) = 스레드» CPU 를이용하는기본단위» thread ID, PC, 레지스터세트, 스택영역을가짐»

More information

Microsoft PowerPoint - 13 ¼ÒÄÏÀ» ÀÌ¿ëÇÑ Åë½Å 2.ppt

Microsoft PowerPoint - 13 ¼ÒÄÏÀ» ÀÌ¿ëÇÑ Åë½Å 2.ppt 13 장소켓을이용한통신 (2) 소켓을이용한통신 (2) 함수 - recvfrom - sendto - uname - gethostname - gethostbyname - gethostbyaddr 1 1. 서론 소켓을사용하여비연결형모델로통신을하기위한함수와그외의함수 함수 의미 recvfrom 비연결형모델에서소켓을통해메시지를수신한다. sendto 비연결형모델에서소켓을통해메시지를송신한다.

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information

교육2 ? 그림

교육2 ? 그림 Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

More information

JAVA PROGRAMMING 실습 09. 예외처리

JAVA PROGRAMMING 실습 09. 예외처리 2015 학년도 2 학기 예외? 프로그램실행중에발생하는예기치않은사건 예외가발생하는경우 정수를 0으로나누는경우 배열의크기보다큰인덱스로배열의원소를접근하는경우 파일의마지막부분에서데이터를읽으려고하는경우 예외처리 프로그램에문제를발생시키지않고프로그램을실행할수있게적절한조치를취하는것 자바는예외처리기를이용하여예외처리를할수있는기법제공 자바는예외를객체로취급!! 나뉨수를입력하시오

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

Java

Java Java http://cafedaumnet/pway Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength();

More information

Design Issues

Design Issues 11 COMPUTER PROGRAMMING INHERIATANCE CONTENTS OVERVIEW OF INHERITANCE INHERITANCE OF MEMBER VARIABLE RESERVED WORD SUPER METHOD INHERITANCE and OVERRIDING INHERITANCE and CONSTRUCTOR 2 Overview of Inheritance

More information

bn2019_2

bn2019_2 arp -a Packet Logging/Editing Decode Buffer Capture Driver Logging: permanent storage of packets for offline analysis Decode: packets must be decoded to human readable form. Buffer: packets must temporarily

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

3. 다음장에나오는 sigprocmask 함수의설명을참고하여다음프로그램의출력물과그출력물이화면이표시되는시점을예측하세요. ( 힌트 : 각줄이표시되는시점은다음 4 가지중하나. (1) 프로그램수행직후, (2) kill 명령실행직후, (3) 15 #include <signal.

3. 다음장에나오는 sigprocmask 함수의설명을참고하여다음프로그램의출력물과그출력물이화면이표시되는시점을예측하세요. ( 힌트 : 각줄이표시되는시점은다음 4 가지중하나. (1) 프로그램수행직후, (2) kill 명령실행직후, (3) 15 #include <signal. 학번 : 이름 : 1. 다음가정하에서아래프로그램의출력물을예측하세요. 가정 : 부모프로세스의 process id=20100, 자식프로세스의 process id=20101. int glob = 31; /* external variable in initialized data */ char buf[] = "a write to stdout\n"; int main(void)

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) Date

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 얇지만얇지않은 TCP/IP 소켓프로그래밍 C 2 판 4 장 UDP 소켓 제 4 장 UDP 소켓 4.1 UDP 클라이언트 4.2 UDP 서버 4.3 UDP 소켓을이용한데이터송싞및수싞 4.4 UDP 소켓의연결 UDP 소켓의특징 UDP 소켓의특성 싞뢰할수없는데이터젂송방식 목적지에정확하게젂송된다는보장이없음. 별도의처리필요 비연결지향적, 순서바뀌는것이가능 흐름제어 (flow

More information

gnu-lee-oop-kor-lec06-3-chap7

gnu-lee-oop-kor-lec06-3-chap7 어서와 Java 는처음이지! 제 7 장상속 Super 키워드 상속과생성자 상속과다형성 서브클래스의객체가생성될때, 서브클래스의생성자만호출될까? 아니면수퍼클래스의생성자도호출되는가? class Base{ public Base(String msg) { System.out.println("Base() 생성자 "); ; class Derived extends Base

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 인터넷프로토콜 5 장 데이터송수신 (3) 1 파일전송메시지구성예제 ( 고정크기메시지 ) 전송방식 : 고정크기 ( 바이너리전송 ) 필요한전송정보 파일이름 ( 최대 255 자 => 255byte 의메모리공간필요 ) 파일크기 (4byte 의경우최대 4GB 크기의파일처리가능 ) 파일내용 ( 가변길이, 0~4GB 크기 ) 메시지구성 FileName (255bytes)

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 객체지향프로그래밍 IT CookBook, 자바로배우는쉬운자료구조 q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 q 객체지향프로그래밍의이해 v 프로그래밍기법의발달 A 군의사업발전 1 단계 구조적프로그래밍방식 3 q 객체지향프로그래밍의이해 A 군의사업발전 2 단계 객체지향프로그래밍방식 4 q 객체지향프로그래밍의이해 v 객체란무엇인가

More information

Microsoft PowerPoint - 12 ¼ÒÄÏÀ» ÀÌ¿ëÇÑ Åë½Å 1.ppt

Microsoft PowerPoint - 12 ¼ÒÄÏÀ» ÀÌ¿ëÇÑ Åë½Å 1.ppt 12 장 소켓을이용한통신 (1) 함수 - inet_addr - inet_ntoa - socket - bind - listen - accept - connect - recv -send 1 서론 파이프를사용하여통신을하기위한시스템호출 / 표준라이브러리함수 함수 의미 inet_addr 문자열형태의인터넷주소를바이너리형태로변환한다. inet_ntoa 바이너리형태의인터넷주소를문자열형태로변환한다.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 명품 Java Essential 1 2 학습목표 1. 소켓통신에대한이해 2. 자바로간단한소켓통신프로그램작성 TCP/IP 소개 3 TCP/IP 프로토콜 두시스템간에데이터가손상없이안전하게전송되도록하는통신프로토콜 TCP 에서동작하는응용프로그램사례 e-mail, FTP, 웹 (HTTP) 등 TCP/IP 특징 연결형통신 한번연결후계속데이터전송가능 보낸순서대로받아응용프로그램에게전달

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 실습 1 배효철 th1g@nate.com 1 목차 조건문 반복문 System.out 구구단 모양만들기 Up & Down 2 조건문 조건문의종류 If, switch If 문 조건식결과따라중괄호 { 블록을실행할지여부결정할때사용 조건식 true 또는 false값을산출할수있는연산식 boolean 변수 조건식이 true이면블록실행하고 false 이면블록실행하지않음 3

More information

FileMaker ODBC 및 JDBC 가이드

FileMaker ODBC 및 JDBC 가이드 FileMaker ODBC JDBC 2004-2019 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker, FileMaker Cloud, FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker,

More information

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f JPA 에서 QueryDSL 사용하기위해 JPAQuery 인스턴스생성방법 http://ojc.asia, http://ojcedu.com 1. JPAQuery 를직접생성하기 JPAQuery 인스턴스생성하기 QueryDSL의 JPAQuery API를사용하려면 JPAQuery 인스턴스를생성하면된다. // entitymanager는 JPA의 EntityManage

More information

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 배효철 th1g@nate.com 1 목차 표준입출력 파일입출력 2 표준입출력 표준입력은키보드로입력하는것, 주로 Scanner 클래스를사용. 표준출력은화면에출력하는메소드를사용하는데대표적으로 System.out.printf( ) 를사용 3 표준입출력 표준출력 : System.out.printlf() 4 표준입출력 Example 01 public static void

More information

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 클래스의사용법은다음과같다. PrintWriter writer = new PrintWriter("output.txt");

More information

4장.문장

4장.문장 문장 1 배정문 혼합문 제어문 조건문반복문분기문 표준입출력 입출력 형식화된출력 [2/33] ANSI C 언어와유사 문장의종류 [3/33] 값을변수에저장하는데사용 형태 : < 변수 > = < 식 > ; remainder = dividend % divisor; i = j = k = 0; x *= y; 형변환 광역화 (widening) 형변환 : 컴파일러에의해자동적으로변환

More information

Microsoft PowerPoint - [EEL2] Lab10.pptx

Microsoft PowerPoint - [EEL2] Lab10.pptx Lab10 (Week 13) 네트워크프로그래밍 전자공학실험 2 Week13: 실습과제 (Lab10) Lab10 #1~#4 실습일실습시간종료시까지이메일로제출 이메일제목 : [EEL2] Lab10-Part1 Lab10 #5~#7 다음주실습시간시작시하드카피 ( 리포트 ) 로제출 리포트제목 : [EEL2] Lab10-Part2 최소 1 시간은실습실에서실습을진행해야합니다.

More information

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 ALTIBASE HDB 6.5.1.5.10 Patch Notes 목차 BUG-46183 DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG-46249 [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 BUG-46266 [sm]

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

thesis

thesis CORBA TMN Surveillance System DPNM Lab, GSIT, POSTECH Email: mnd@postech.ac.kr Contents Motivation & Goal Related Work CORBA TMN Surveillance System Implementation Conclusion & Future Work 2 Motivation

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 네트워크프로그래밍 02 장 TCP 소켓 (1) 1 목차 제 2장 TCP 소켓 1. IPv4 TCP 클라이언트 2. IPv4 TCP 서버 3. 소켓의생성과해지 4. 주소지정 5. 소켓에연결 6. 소켓을주소에바인딩하기 7. 클라이언트의연결요청처리 8. 데이터주고받기 9. IPv6의사용 2 소켓통신과정 간략화한소켓통신과정 소켓생성 TCP or UDP 소켓에주소정보할당

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 23 장스레드 이번장에서학습할내용 스레드의개요 스레드의생성과실행 스레드상태 스레드의스케줄링 스레드간의조정 스레드는동시에여러개의프로그램을실행하는효과를냅니다. 멀티태스킹 멀티태스킹 (muli-tasking) 는여러개의애플리케이션을동시에실행하여서컴퓨터시스템의성능을높이기위한기법 스레드란? 다중스레딩 (multi-threading) 은하나의프로그램이동시에여러가지작업을할수있도록하는것

More information

10주차.key

10주차.key 10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information