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

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start 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