Skip to content

Latest commit

 

History

History
99 lines (54 loc) · 2.21 KB

README.md

File metadata and controls

99 lines (54 loc) · 2.21 KB

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