You are viewing a potentially older version of this package. View all versions.
Robyn-CodeTalker-1.1.3 icon

CodeTalker

A simple library to abstract away networking

Date uploaded 2 weeks ago
Version 1.1.3
Download link Robyn-CodeTalker-1.1.3.zip
Downloads 7071
Dependency string Robyn-CodeTalker-1.1.3

README

CodeTalker

CodeTalker is a lightweight C# networking library designed to simplify sending and receiving custom packets in Atlyss. It allows you to create your own packet types and register callbacks that are automatically invoked when matching packets are received.

Special Thanks: ButteredLilly for initial inspiration for the delivery method, thanks!

Features

  • Define custom packet classes by inheriting from PacketBase.
  • Easily register listeners for specific packet types.
  • Automatically deserialize incoming messages and dispatch them to the appropriate listener.
  • Packets are serialized into Steam lobby chat messages, avoiding the need for new RPCs that could disrupt multiplayer or clutter the in-game chat.

How it works

  • Create your packet classes by inheriting from PacketBase.
  • Register listeners for your packet types using CodeTalkerNetwork.RegisterListener<T>().
  • Send packets using CodeTalkerNetwork.SendNetworkPacket().
  • Incoming messages are deserialized and routed automatically to the registered listeners.
  • PacketHeader information is included with each payload, providing useful data such as the sender's identity and whether the sender is the host.

For a full example, see the example folder in the repo.


CHANGELOG

Changelog

Version 1.1.3

  • Exception logging will ignore type load errors for the sake of debugging. This is a minor change aimed at developers

Version 1.1.2

  • Adds much smarter exception handling to help users understand where networking errors occur and what mod is to blame
  • Lowers network buffer to 4kb from 10kb for better memory usage