Giter Site home page Giter Site logo

mychatroom's Introduction

MyChatRoom

A chat room demo based on Socket, include server and client, written in C#.

介绍

一个用C#编写的基于Socket的Windows版聊天室,包括服务端和客户端。当服务端启动服务后,客户端可以连接到服务端,给服务端发送数据,服务端可以接收数据; 服务端可以给客户端发送数据,客户端接收; 可以有多个客户端同时连接服务端,服务端可以群发消息到每个客户端。

主要知识点

  • 委托,委托原理
  • 文件读操作,文件写操作
  • 单线程和多线程
  • 简单多线程实现
  • 套接字简介
  • IP和端口
  • 服务端和客户端循环接收对方数据,双向通信
  • 发送文字,发送文件(自定义消息协议)
  • 异常处理

服务端启动:

server

客户端连接到服务端后可以和服务端传输数据和文件:

client

下载

Download link 可执行文件

mychatroom's People

Contributors

frankfan avatar

Stargazers

 avatar

Watchers

 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.