Code Monkey home page Code Monkey logo

chat-room's Introduction

网络应用作业

yarn install

yarn start

open http://localhost:3000

课题

基于TCP协议C/S模式的聊天程序的设计

介绍

基于 TCP 协议,利用 socket,连接客户端和服务端,进行全双工的通信。

流程

先启动服务端 http 服务,同时启动 socket 服务器,并在用户连接时开始监听特定的用户事件。

之后客户端请求页面,连接 socket 服务器,触发特定事件,并通过 socket 告知服务器,服务器做出诸如修改用户名、用户登入、发送消息、发送文件、用户帮助、学生课表等诸多操作。

在满足基础聊天功能的同时,利用 puppeteer 构建爬虫功能,将学生常用的课表等功能,让学生可以通过一个简单的命令就获取到自己的课表。

文件介绍

.
├── README.md 说明
├── handler 处理逻辑的代码所在的文件夹
│   ├── pupp.js 爬虫相关
│   └── socket.js socket 请求相关
├── index.js 主文件,入口文件
├── package.json 依赖说明的 json
├── public  静态资源
│   ├── index.js 页面相关逻辑的js
│   └── temp 临时文件夹,存储上传的文件
├── views
│   └── index.ejs 静态页面,主页
└── yarn.lock 依赖的版本lock

chat-room's People

Contributors

gooeynyan avatar

Stargazers

CattChen avatar

Watchers

James Cloos avatar  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.