Documentation ¶
Index ¶
- type Deadline
- type Handler
- type Stream
- func (r *Stream) Close() error
- func (r *Stream) Peek(n int) (p []byte, err error)
- func (r *Stream) Read(p []byte) (n int, err error)
- func (r *Stream) ReadN(n int) (p []byte, err error)
- 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 }
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a buffered I/O channel.
func NewStream ¶
func NewStream(channel io.ReadWriteCloser) *Stream
NewStream returns a new buffered I/O channel. channel is an underlying I/O channel that implements io.ReadWriteCloser.
func (*Stream) ReadN ¶
ReadN reads exactly n bytes from this 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) SetReadTimeout ¶
SetReadTimeout sets read timeout of the underlying I/O channel if the channel implements Deadline interface.
func (*Stream) SetWriteTimeout ¶
SetWriteTimeout sets write timeout of the underlying I/O channel if the channel 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) Latency ¶
func (r *Transceiver) Latency() time.Duration
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.