mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-11 03:06:51 +02:00
feat(idlesleep): support idlesleep for stream routes, rewritten and fixed stream implementation
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
||||
)
|
||||
|
||||
type Stream interface {
|
||||
ListenAndServe(ctx context.Context, preDial PreDialFunc)
|
||||
ListenAndServe(ctx context.Context, preDial, onRead HookFunc)
|
||||
LocalAddr() net.Addr
|
||||
Close() error
|
||||
}
|
||||
|
||||
type PreDialFunc func(ctx context.Context) error
|
||||
type HookFunc func(ctx context.Context) error
|
||||
|
||||
Reference in New Issue
Block a user