Documentation ¶
Index ¶
- type Handler
- type Stream
- func (r *Stream) Close() error
- func (r *Stream) GetReadTimeout() time.Duration
- func (r *Stream) GetWriteTimeout() time.Duration
- func (r *Stream) LastRead() time.Time
- func (r *Stream) LastWrite() time.Time
- func (r *Stream) Peek(n int) ([]byte, error)
- func (r *Stream) Read(p []byte) (n int, err error)
- func (r *Stream) ReadN(n int) (p []byte, err error)
- func (r *Stream) RemoteAddr() net.Addr
- func (r *Stream) SetReadTimeout(t time.Duration)
- func (r *Stream) SetWriteTimeout(t time.Duration)
- func (r *Stream) Write(p []byte) (n int, err error)
- type Transceiver
- type WriteCloser
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { OnHello(openflow.Factory, Writer, openflow.Hello) error OnError(openflow.Factory, Writer, openflow.Error) error OnFeaturesReply(openflow.Factory, Writer, openflow.FeaturesReply) error OnGetConfigReply(openflow.Factory, Writer, openflow.GetConfigReply) error OnDescReply(openflow.Factory, Writer, openflow.DescReply) error OnPortDescReply(openflow.Factory, Writer, openflow.PortDescReply) error OnPortStatus(openflow.Factory, Writer, openflow.PortStatus) error OnFlowRemoved(openflow.Factory, Writer, openflow.FlowRemoved) error OnPacketIn(openflow.Factory, Writer, openflow.PacketIn) error OnBarrierReply(openflow.Factory, Writer, openflow.BarrierReply) error }
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a buffered I/O channel.
func NewStream ¶
func NewStream(channel io.ReadWriteCloser, bufSize int) *Stream
NewStream returns a new buffered I/O channel. channel is an underlying I/O channel that implements io.ReadWriteCloser.
func (*Stream) GetReadTimeout ¶
func (*Stream) GetWriteTimeout ¶
func (*Stream) LastRead ¶
LastRead returns the timestamp of the last successful read operation except Peek().
func (*Stream) ReadN ¶
ReadN reads exactly n bytes from the underlying socket. It returns non-nil error if len(p) < n, and the data, whose length is len(p) bytes long, still remains in the socket buffer.
func (*Stream) RemoteAddr ¶
func (*Stream) SetReadTimeout ¶
SetReadTimeout sets read timeout of the underlying socket if it implements deadline interface.
func (*Stream) SetWriteTimeout ¶
SetWriteTimeout sets write timeout of the underlying socket if it implements deadline interface.
type Transceiver ¶
type Transceiver struct {
// contains filtered or unexported fields
}
func NewTransceiver ¶
func NewTransceiver(stream *Stream, handler Handler) *Transceiver
func (*Transceiver) Close ¶
func (r *Transceiver) Close() error
func (*Transceiver) Version ¶
func (r *Transceiver) Version() (negotiated bool, version uint8)
func (*Transceiver) Write ¶
func (r *Transceiver) Write(msg encoding.BinaryMarshaler) error
type WriteCloser ¶
type Writer ¶
type Writer interface {
Write(msg encoding.BinaryMarshaler) error
}
Click to show internal directories.
Click to hide internal directories.