summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-06-04 17:13:39 +0200
committerbt <bt@rctt.net>2026-06-04 17:13:39 +0200
commit6628f924ba4aefa8f8361ebc252fb225718359c2 (patch)
treef1337371a66546c5d87908b5fac682ff6b1b92f2 /client
parented2621c17f353878ea86ce2c16cac7cd04fb4c6a (diff)
downloadsolec-0.6.0.tar.gz
solec-0.6.0.zip
[common] Add channels list queryv0.6.0
Diffstat (limited to 'client')
-rw-r--r--client/client.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/client.go b/client/client.go
index ba53ec9..a9dfb2d 100644
--- a/client/client.go
+++ b/client/client.go
@@ -12,6 +12,7 @@ import (
type Handler interface {
HandleMessage(msg core.Message)
+ HandleListItem(list core.ListItem)
HandleError(err error)
}
@@ -110,6 +111,15 @@ func (c *Client) GetHistory(channel string, since time.Time, count, offset int)
return core.Send(c.conn, hist)
}
+func (c *Client) GetList(count, offset int) error {
+ list := core.List{
+ Count: int64(count),
+ Offset: int64(offset),
+ }
+
+ return core.Send(c.conn, list)
+}
+
func (c *Client) read() {
for {
payload, err := core.Read(c.conn)
@@ -128,5 +138,7 @@ func (c *Client) handlePayload(payload any) {
switch v := payload.(type) {
case core.Message:
c.h.HandleMessage(v)
+ case core.ListItem:
+ c.h.HandleListItem(v)
}
}