Versions in this module Expand all Collapse all v0 v0.4.0 Nov 14, 2019 Changes in this version + var DefaultTickerInterval = time.Second + var ErrClosed = serrors.New("closed") + var ErrDispatcherDead = serrors.New("dispatcher dead") + var ErrReconnecterStopped = serrors.New("stop method was called") + var ErrReconnecterTimeoutExpired = serrors.New("timeout expired") + type AtomicBool struct + func (f *AtomicBool) IsFalse() bool + func (f *AtomicBool) IsTrue() bool + func (f *AtomicBool) Set(v bool) + type BaseOperation struct + type DispatcherService struct + func NewDispatcherService(dispatcher reliable.DispatcherService) *DispatcherService + func (pn *DispatcherService) Register(ia addr.IA, public *addr.AppAddr, bind *overlay.OverlayAddr, svc addr.HostSVC) (net.PacketConn, uint16, error) + func (pn *DispatcherService) RegisterTimeout(ia addr.IA, public *addr.AppAddr, bind *overlay.OverlayAddr, svc addr.HostSVC, ...) (net.PacketConn, uint16, error) + type IOOperation interface + Do func(conn net.PacketConn) error + IsWrite func() bool + type PacketConn struct + func NewPacketConn(dispConn net.PacketConn, reconnecter Reconnecter) *PacketConn + func (conn *PacketConn) Close() error + func (conn *PacketConn) DoIO(op IOOperation) error + func (conn *PacketConn) LocalAddr() net.Addr + func (conn *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) + func (conn *PacketConn) Reconnect() (net.PacketConn, error) + func (conn *PacketConn) SetDeadline(deadline time.Time) error + func (conn *PacketConn) SetReadDeadline(deadline time.Time) error + func (conn *PacketConn) SetWriteDeadline(deadline time.Time) error + func (conn *PacketConn) WriteTo(b []byte, address net.Addr) (int, error) + type ReadFromOperation struct + func (op *ReadFromOperation) Do(conn net.PacketConn) error + type ReadOperation struct + func (_ *ReadOperation) IsWrite() bool + type Reconnecter interface + Reconnect func(timeout time.Duration) (net.PacketConn, uint16, error) + Stop func() + type State struct + func NewState() *State + func (s *State) SetDown() + func (s *State) SetUp() + func (s *State) Up() <-chan struct{} + type TickingReconnecter struct + func NewTickingReconnecter(f func(timeout time.Duration) (net.PacketConn, uint16, error)) *TickingReconnecter + func (r *TickingReconnecter) Reconnect(timeout time.Duration) (net.PacketConn, uint16, error) + func (r *TickingReconnecter) Stop() + type WriteOperation struct + func (_ *WriteOperation) IsWrite() bool + type WriteToOperation struct + func (op *WriteToOperation) Do(conn net.PacketConn) error