Getty is an asynchronous network I/O library developed in Golang. It operates on TCP, UDP, and WebSocket network protocols, providing a consistent interface EventListener. Within Getty, each connection (session) involves two separate goroutines. One handles the reading of TCP streams, UDP packets, or WebSocket packages, while the other manages the logic processing and writes responses into the network write buffer. If your logic processing might take a considerable amount of time, it's recommended to start a new logic process goroutine yourself within codec.go's (Codec)OnMessage method. Additionally, you can manage heartbeat logic within the (Codec)OnCron method in codec.go. If you're using TCP or UDP, you should send heartbeat packages yourself and then call session.go's (Session)UpdateActive method to update the session's activity timestamp. You can verify if a TCP session has timed out or not in codec.go's (Codec)OnCron method using session.go's (Session)GetActive method.

Features

  • Licensed under the Apache License
  • Code examples
  • Netty-like asynchronous network I/O library
  • You can manage heartbeat logic
  • You can verify if a TCP session has timed out or not
  • It operates on TCP, UDP, and WebSocket network protocols, providing a consistent interface EventListener
  • Within Getty, each connection (session) involves two separate goroutines

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

Apache License V2.0

Follow getty

getty Web Site

Other Useful Business Software
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime Icon
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime

General-purpose, compute-optimized, or GPU/TPU-accelerated. Built to your exact specs.

Live migration and automatic failover keep workloads online through maintenance. One free e2-micro VM every month.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of getty!

Additional Project Details

Programming Language

Go

Related Categories

Go JSON Software

Registered

2023-10-18