Skip to content

Hong-been/Linux-system-C-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Linux-system-programming

  • Socket, log-in and reservation in C
  • If you want to use this program, you should run the "Makefile" which is in each directory

  1. An input example(for client)
  1. exam
  • NAME(ID)
  • 0000(PW) //Correct password
  • 3(product number)
  • 1(order quantity)
  1. exam
  • NAME(ID)
  • 0000(PW) //Worng password
  • y(retry)
  • 9999(PW) //Correct password
  • 3(product number)
  • 1(order quantity)

  1. Log-in
  • Enter ID
  • If this ID exists, the client would enter the password and be checked if it is correct.
  • If it's not correct, the server would ask the client to enter the password again. When the client says "y", the user could retry.
  • If this ID is not existed, the server would make new directory and take the password and save.
  • The password should be a 4-letter word. If it is more than 4 letters, the server would save only the first 4 letters.
  1. 로그인
  • Id입력
  • 기존에 있는 id이면 pw를 입력받고 일치하는지 확인, 불일치면 다시 입력하는지 묻고 재시도
  • 기존에 없는 새 id이면 새로운 dir생성, pw를 입력받고 저장
  • pw는 4글자, 그 이상받아도 앞 4글자만 저장됨

  1. Show the List of Products and Price.
  • When the client logs in successfully, the server gives the list of products and price to the client.
  1. 상품 출력
  • 로그인을 성공하면 서버에서 상품과 가격을 받아 출력함

  1. Pick One.
  • The client should enter the number of a product that the customer wants.
  1. 상품 고르기
  • 원하는 상품의 번호를 입력

  1. The Quantity
  • Enter the quantity how many the customer wants it.
  1. 상품 수량
  • 원하는 수량을 입력

  1. Complete the order and Save
  • Save the details of the order such as product's name, quantity and total bill.
  1. 주문완료 & 저장
  • 주문 완료된 상세정보(주문한 상품, 갯수, 가격)을 서버에 저장
  • 클라이언트에게 출력

  1. The 5min timeout works when there is no interactive activies to server.

  2. 5분이상 입력없으면 강제종료


About

Socket, log-in and reservation in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published