Git Product home page Git Product logo

tcpchat's Introduction

TCPchat

請設計一個client/server 架構的程式,須滿足以下功能

  1. 假設server內建帳號 user="pi", password="csie"
  2. server端允許透過port 8080的所有連線
  3. 連線成功 server端會送出"Login:"字串
  4. client端收到"Login:"字串後,可以讓使用使透過input 指令輸入使用者帳號,然後傳給server 5A. 如果server收到帳號不是"pi",回傳給client "No such user!"然後斷線 5B. 如果server收到帳號是"pi",回傳給client "Password:"。
  5. client端收到"Password:"後,,可以讓使用使透過input 指令輸入使用者密碼,然後傳給server 7A. 如果server收到帳號密碼是"csie",回傳給client "Login OK!"然後斷線 7B. 如果server收到帳號密碼不是"csie",回傳給client "Password Error!"然後斷線

tcpchat's People

Contributors

shibawalker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.