Skip to content

cmd-stream/delegate-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delegate-go

Go Reference GoReportCard codecov

delegate-go facilitates communication between the cmd-stream client and server. It provides implementations of the core.ClientDelegate and core.ServerDelegate interfaces, both of which rely on an abstract transport layer for data exchange.

This module allows the server to initialize the client connection by sending a ServerInfo byte slice, typically used to indicate a set of supported commands. Client creation may fail with an error if it's ServerInfo doen't match the one received from the server.

Additionally, the client package includes KeepaliveDelegate and ReconnectDelegate:

  • KeepaliveDelegate initiates a ping-pong exchange with the server when no commands are pending. It sends the Ping command and expects the Pong result, both transmitted as a single zero byte (like a ball).
  • ReconnectDelegate implements the core.ClientReconnectDelegate interface, providing a Reconnect method that should be invoked by the client if the connection to the server is lost.

About

Provides communication between the cmd-stream-go client and server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages