Documentation ¶
Overview ¶
Package adapter ...
Index ¶
- Constants
- func NewSyncClientService(adapter *Adapter) base.IORCService
- func NewSyncServerService(adapter *Adapter) base.IORCService
- type Adapter
- type IConn
- type IReceiver
- type StreamConn
- func (p *StreamConn) Close()
- func (p *StreamConn) IsActive(nowNS int64, timeout time.Duration) bool
- func (p *StreamConn) LocalAddr() net.Addr
- func (p *StreamConn) OnClose()
- func (p *StreamConn) OnError(err *base.Error)
- func (p *StreamConn) OnFillWrite(b []byte) int
- func (p *StreamConn) OnOpen()
- func (p *StreamConn) OnReadBytes(b []byte)
- func (p *StreamConn) OnReadReady() bool
- func (p *StreamConn) OnWriteReady() bool
- func (p *StreamConn) RemoteAddr() net.Addr
- func (p *StreamConn) SetNext(_ IConn)
- func (p *StreamConn) SetReceiver(receiver IReceiver)
- func (p *StreamConn) WriteStreamAndRelease(stream *rpc.Stream)
- type SyncConn
- func (p *SyncConn) Close()
- func (p *SyncConn) LocalAddr() net.Addr
- func (p *SyncConn) OnClose()
- func (p *SyncConn) OnError(err *base.Error)
- func (p *SyncConn) OnFillWrite(_ []byte) int
- func (p *SyncConn) OnOpen()
- func (p *SyncConn) OnReadBytes(_ []byte)
- func (p *SyncConn) OnReadReady() bool
- func (p *SyncConn) OnWriteReady() bool
- func (p *SyncConn) RemoteAddr() net.Addr
- func (p *SyncConn) SetNext(next IConn)
Constants ¶
View Source
const ErrNetClosingSuffix = "use of closed network connection"
ErrNetClosingSuffix ...
Variables ¶
This section is empty.
Functions ¶
func NewSyncClientService ¶
func NewSyncClientService(adapter *Adapter) base.IORCService
NewSyncClientService ...
func NewSyncServerService ¶
func NewSyncServerService(adapter *Adapter) base.IORCService
NewSyncServerService ...
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter ...
func NewClientAdapter ¶
func NewClientAdapter( network string, addr string, tlsConfig *tls.Config, rBufSize int, wBufSize int, receiver IReceiver, ) *Adapter
NewClientAdapter ...
type IConn ¶
type IConn interface { OnOpen() OnClose() OnError(err *base.Error) OnReadReady() bool OnWriteReady() bool OnReadBytes(b []byte) OnFillWrite(b []byte) int SetNext(conn IConn) LocalAddr() net.Addr RemoteAddr() net.Addr Close() }
IConn ...
type IReceiver ¶
type IReceiver interface { OnConnOpen(streamConn *StreamConn) OnConnClose(streamConn *StreamConn) OnConnReadStream(streamConn *StreamConn, stream *rpc.Stream) OnConnError(streamConn *StreamConn, err *base.Error) }
IReceiver ...
type StreamConn ¶
type StreamConn struct {
// contains filtered or unexported fields
}
StreamConn ...
func NewStreamConn ¶
func NewStreamConn(isDebug bool, prev IConn, receiver IReceiver) *StreamConn
NewStreamConn ...
func (*StreamConn) IsActive ¶
func (p *StreamConn) IsActive(nowNS int64, timeout time.Duration) bool
IsActive ...
func (*StreamConn) SetReceiver ¶
func (p *StreamConn) SetReceiver(receiver IReceiver)
SetReceiver ...
func (*StreamConn) WriteStreamAndRelease ¶
func (p *StreamConn) WriteStreamAndRelease(stream *rpc.Stream)
WriteStreamAndRelease ...
type SyncConn ¶
SyncConn ...
func NewClientSyncConn ¶
NewClientSyncConn ...
func NewServerSyncConn ¶
NewServerSyncConn ...
Click to show internal directories.
Click to hide internal directories.