You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
512 B
24 lines
512 B
3 years ago
|
package rpc
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/gotd/td/bin"
|
||
|
)
|
||
|
|
||
|
// Send is a function that sends requests to the server.
|
||
|
type Send func(ctx context.Context, msgID int64, seqNo int32, in bin.Encoder) error
|
||
|
|
||
|
// NopSend does nothing.
|
||
|
func NopSend(context.Context, int64, int32, bin.Encoder) error { return nil }
|
||
|
|
||
|
var _ Send = NopSend
|
||
|
|
||
|
// DropHandler handles drop rpc requests.
|
||
|
type DropHandler func(req Request) error
|
||
|
|
||
|
// NopDrop does nothing.
|
||
|
func NopDrop(Request) error { return nil }
|
||
|
|
||
|
var _ DropHandler = NopDrop
|