GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - Three-Byte/three-byte.link-lib: A family of .NET communication libraries for TCP, UDP, Serial, PJLink projector control, and NetBooter power management โ€” async, thread-safe, and cross-platform.

BranchesTags
Open more actions menu

Latest commit

 

History

58 Commits
58 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ThreeByte.LinkLib
ThreeByte.LinkLib
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

๐Ÿ”— ThreeByte.LinkLib

A family of .NET communication libraries for TCP, UDP, Serial, projector control (PJLink), and networked power management (NetBooter).

.NET License: MIT NuGet


๐Ÿ“ฆ Packages

Package NuGet Description
๐ŸŒ TcpLink NuGet Async TCP client with auto-reconnect and message queuing
๐Ÿ“ก UdpLink NuGet Async UDP client with configurable local/remote endpoints
๐Ÿ”Œ SerialLink NuGet RS-232 serial communication with optional frame-based protocol
๐ŸŽฌ ProjectorLink NuGet PJLink protocol client for projector power control and queries
๐Ÿ”‹ NetBooter NuGet Synaccess NetBooter networked power outlet controller
๐Ÿงฉ Shared NuGet Shared logging infrastructure (auto-included as dependency)

โœจ Features

  • Asynchronous โ€” Non-blocking I/O across all transport layers
  • Thread-Safe โ€” Lock-protected operations for concurrent access
  • Message Queuing โ€” FIFO queues (up to 100 messages) for reliable retrieval
  • Event-Driven โ€” Rich events for connection changes, data arrival, and errors
  • Auto-Reconnect โ€” TCP and Serial links recover automatically from failures
  • Cross-Platform โ€” Targets .NET 10.0, .NET Standard 2.0, and .NET Standard 2.1

๐Ÿ“ฅ Installation

Install only the packages you need:

dotnet add package ThreeByte.LinkLib.TcpLink
dotnet add package ThreeByte.LinkLib.UdpLink
dotnet add package ThreeByte.LinkLib.SerialLink
dotnet add package ThreeByte.LinkLib.ProjectorLink
dotnet add package ThreeByte.LinkLib.NetBooter

๐Ÿš€ Quick Start

TCP โ€” Connect to a device

using ThreeByte.LinkLib.TcpLink;

var tcp = new AsyncTcpLink("192.168.1.100", 5000);
tcp.DataReceived += (s, e) => Console.WriteLine($"Got {tcp.GetMessage()?.Length} bytes");

byte[] cmd = System.Text.Encoding.ASCII.GetBytes("HELLO\r\n");
tcp.SendMessage(cmd);

UDP โ€” Fire-and-forget datagrams

using ThreeByte.LinkLib.UdpLink;

var udp = new AsyncUdpLink("192.168.1.50", remotePort: 9000, localPort: 9001);
udp.SendMessage(System.Text.Encoding.ASCII.GetBytes("PING"));

Serial โ€” Talk to RS-232 devices

using ThreeByte.LinkLib.SerialLink;

var serial = new SerialLink("COM3", baudRate: 9600);
serial.SendData(new byte[] { 0x01, 0x02, 0x03 });

Projector โ€” PJLink power control

using ThreeByte.LinkLib.ProjectorLink;

using var projector = new Projector("192.168.1.200");
projector.TurnOn();
PowerStatus status = projector.GetState();
string info = projector.GetInfo();  // "Epson EB-L1755U (Main Hall)"

NetBooter โ€” Remote power outlet control

using ThreeByte.LinkLib.NetBooter;

var netBooter = new NetBooterLink("192.168.1.10");
netBooter.Power(outlet: 1, state: true);   // Turn on outlet 1
netBooter.PollState();
bool isOn = netBooter[1];                  // Check outlet state

๐Ÿ—๏ธ Architecture

graph TD
    App["๐Ÿ–ฅ๏ธ Your Application"]

    App --> TCP["๐ŸŒ TcpLink<br/><i>Async TCP Client</i>"]
    App --> UDP["๐Ÿ“ก UdpLink<br/><i>Async UDP Client</i>"]
    App --> Serial["๐Ÿ”Œ SerialLink<br/><i>RS-232 Communication</i>"]
    App --> Projector["๐ŸŽฌ ProjectorLink<br/><i>PJLink Protocol</i>"]
    App --> NetBooter["๐Ÿ”‹ NetBooter<br/><i>HTTP Power Control</i>"]

    TCP --> Shared["๐Ÿงฉ Shared<br/><i>LogFactory ยท Logging</i>"]
    UDP --> Shared
    Serial --> Shared
    Projector --> Shared
    NetBooter --> Shared

    style App fill:#4a90d9,stroke:#2c5f8a,color:#fff
    style TCP fill:#6c5ce7,stroke:#4a3db5,color:#fff
    style UDP fill:#6c5ce7,stroke:#4a3db5,color:#fff
    style Serial fill:#6c5ce7,stroke:#4a3db5,color:#fff
    style Projector fill:#e17055,stroke:#b5553f,color:#fff
    style NetBooter fill:#e17055,stroke:#b5553f,color:#fff
    style Shared fill:#00b894,stroke:#009472,color:#fff
Loading

๐Ÿ“‹ How to Build and Publish NuGet Packages

  1. Create a new branch and make your changes in any ThreeByte.LinkLib.* folder

  2. Commit and push to GitHub

  3. Create a pull request to main and attach a label:

    • major โ€” breaking changes
    • minor โ€” new features
    • patch โ€” bug fixes

    We follow Semantic Versioning

  4. Merge your pull request

  5. Your NuGet package will be available on nuget.org within ~5 minutes


๐Ÿค Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.


๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

MIT License

Copyright (c) 2025 Three Byte

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A family of .NET communication libraries for TCP, UDP, Serial, PJLink projector control, and NetBooter power management โ€” async, thread-safe, and cross-platform.

Topics

asyncav-controlcsharpdevice-communicationdotnetiotnetbooternetworkingnugetpjlinkprojector-controlrs232serial-communicationtcpudp

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.