Skip to content

Jefwillems/Kroker

Repository files navigation

Kroker Project

Overview

The Kroker project is a learning initiative focused on understanding TCP communication and the Kestrel web server's ConnectionHandler. This project involves implementing various protocols, starting with the STOMP (Simple Text Oriented Messaging Protocol) protocol, handling connections, and processing commands in a C# application.

Project Structure

  • Kroker.Core: Contains the core logic for protocol handling, including frame parsing and writing.
  • Kroker.Stomp.Tests: Contains unit tests for the STOMP frame parser and other components.

Key Components

Protocol Handling

The project aims to support multiple protocols, starting with the STOMP protocol. The key classes involved are:

  • StompFrame: Represents a STOMP frame with a command, headers, and content.
  • StompFrameParser: Parses incoming STOMP frames and writes outgoing frames.
  • StompProcessor: Processes incoming STOMP frames and handles different STOMP commands.

TCP Communication

The project uses TCP communication to handle connections and data transfer. This involves:

  • Implementing custom connection handlers.
  • Managing data buffers and parsing incoming data.
  • Sending and receiving protocol frames over TCP.

Kestrel Web Server

The project leverages the Kestrel web server's ConnectionHandler to manage TCP connections. This includes:

  • Creating custom connection handlers to process incoming connections.
  • Integrating the connection handlers with the Kestrel server.
  • Handling connection lifecycle events and data transfer.

Getting Started

Prerequisites

  • .NET SDK
  • Visual Studio or JetBrains Rider

Building the Project

  1. Clone the repository:
    git clone https://github.com/Jefwillems/Kroker.git
  2. Navigate to the project directory:
    cd kroker
  3. Build the project:
    dotnet build

Running the Tests

  1. Navigate to the test project directory:
    cd Kroker.Stomp.Tests
  2. Run the tests:
    dotnet test

Learning Objectives

  • TCP Communication: Understand the basics of TCP communication, including connection handling, data transfer, and buffer management.
  • Kestrel Web Server: Learn how to use the Kestrel web server's ConnectionHandler to manage TCP connections.
  • Protocol Implementation: Gain insights into implementing and handling various protocols, starting with the STOMP protocol, in a C# application.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.


README was written by chatgpt.

Happy coding!

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors