Skip to content

Simple TCP chat using Sockets (.NET). Encoded using Huffman coding.

License

Notifications You must be signed in to change notification settings

v-gabriel/huffchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HuffChat

Simple TCP chat using Sockets (.NET).

Encoded using Huffman coding.


Info

Sockets are initialized through a single Server and multiple Client executables.

Huffman tree generator input is generated during Server setup (check AppConstants.cs in HuffChat.BLL project).

First Server response to the Client is the Huffman generator input needed for sending encoded and decoding incoming messages.

Start options

1. Using terminal and dotnet CLI

First, start the server from the solution root directory (\HuffChat):

dotnet run --project HuffChat.Server

After the server is initialized, you can start one or multiple clients:

1.1 Default - host machine, automatically linked to the above Server

dotnet run --project HuffChat.Client

1.2 Define Client connection using params

  • {y...} values represent the port
  • {x...} values represent the IP address
  • {displayName} is the name shown before each message (random if not provided)
dotnet run --project HuffChat.Client {xxxx::xxxx:xxxx:xxxx:xxxxxx} {yyyyy} {displayName}

2. Using executables

Found in:

  • \HuffChat\HuffChat.Server\bin\Release\net6.0 and \HuffChat\HuffChat.Client\bin\Release\net6.0 or
  • \HuffChat\HuffChat.Server\bin\Debug\net6.0 and \HuffChat\HuffChat.Client\bin\Debug\net6.0

3. Using Visual Studio

Runs 2 instances - 1 Server and 1 Client. Both will be connected to host machine.


Demo

Using executables

Server with 3 connected Clients.

Testing messaging and disconnects.

sockets-chat-stable-demo.mp4

Tech

IDEs: Visual Studio 2022

Frameworks: ASP.NET Core

My Skills


References


Attributions


Authors

About

Simple TCP chat using Sockets (.NET). Encoded using Huffman coding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages