Skip to content

Cobra Network

Cobra Network is a flexible minimalistic server-client networking package designed for use with C# projects, including Unity. It supports .NET Standard 2.1 and higher, making it a flexible choice for various software applications.

Cobra Network is engineered to provide a solid base for building advanced networking solutions, equipped with only the core features necessary for a wide range of projects. This approach ensures that it can be easily integrated in many different types of projects, without imposing rigid coding practices. It empowers developers to expand and enhance their networking solutions in a way that aligns with their unique coding styles and requirements.

Features

  • Authentication: Includes basic username/password authenticators and the ability to implement your own authentication method.
  • Events: Send events between the server and the clients. Events are messages that do not require a response. These can be sent asynchronously or synchronously.
  • Late Events (State Sync): This feature allows for the synchronization of the most recent server events to newly connected clients.
  • Requests: For messages where a response is necessary you can send a request. These can be sent asynchronously or synchronously. If you choose to send them asynchronously you'll get the response back in the same block of code, which can make the code easier to understand and maintain than using callbacks.
  • Flexible Networking: With no dependencies on Unity, Cobra Network is versatile enough to operate within most modern C# environments, not just in Unity.
  • Multiple Transports: Supports UDP, TCP, and WebSocket through Cobra Transports, with the flexibility to integrate custom transport mechanisms if required.
  • Minimalistic Design: Cobra Network focuses on essential functionalities so that the code can be easily integrated in many different types of projects.

Important

Cobra Network is designed for experienced developers and may not be suitable for beginners. Before you begin, please ensure you are either already familiar with, or prepared to learn, the following essential skills:

  1. Advanced C# Knowledge: Proficiency in C#, especially in areas like object-oriented programming, utilizing abstractions and virtual methods, and applying common design patterns.

  2. Networking Fundamentals: Basic knowledge of networking concepts such as port-forwarding, client-server model, and asynchronous programming.

  3. Event-Driven Programming: Experience with handling asynchronous events and designing systems that can process or dispatch events effectively.

  4. Concurrency and Multithreading: Skills in managing multiple threads and handling synchronous/asynchronous communication without blocking the main game thread.

  5. Unity Engine Proficiency: Familiarity with Unity's API, its capabilities and limitations.

  6. Debugging and Optimization: Ability to test, troubleshoot and optimize network communication. ParrelSync can be a helpful tool for this purpose.

  7. Custom Implementation Skills: Be ready to implement features like automatic game object synchronization or scene synchronization if you need them. This lightweight design enhances flexibility but requires developers to be able to write extensible, maintainable code.