Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func I ¶
func I(b []byte) *asciiproto.Frame
func O ¶
func O(b []byte) *asciiproto.Frame
func R ¶
func R(w, h uint16) *asciiproto.Frame
Types ¶
type AsciiTransport ¶
type AsciiTransport struct {
// contains filtered or unexported fields
}
func (*AsciiTransport) Close ¶
func (c *AsciiTransport) Close() error
func (*AsciiTransport) Done ¶
func (c *AsciiTransport) Done() <-chan struct{}
func (*AsciiTransport) Read ¶
func (at *AsciiTransport) Read() (*asciiproto.Frame, error)
Read Unmarshal
func (*AsciiTransport) Write ¶
func (at *AsciiTransport) Write(f *asciiproto.Frame) error
Write Marshal
type AsciiTransportClient ¶
type AsciiTransportClient struct {
*AsciiTransport
}
func Client ¶
func Client(conn io.ReadWriteCloser, opts ...Opt) *AsciiTransportClient
func (*AsciiTransportClient) Input ¶
func (c *AsciiTransportClient) Input(buf []byte)
func (*AsciiTransportClient) InputFrom ¶
func (c *AsciiTransportClient) InputFrom(r io.Reader) error
func (*AsciiTransportClient) ReadLoop ¶
func (c *AsciiTransportClient) ReadLoop()
func (*AsciiTransportClient) Resize ¶
func (c *AsciiTransportClient) Resize(height, width uint16)
type AsciiTransportServer ¶
type AsciiTransportServer struct {
*AsciiTransport
}
func Server ¶
func Server(conn io.ReadWriteCloser, opts ...Opt) *AsciiTransportServer
func (*AsciiTransportServer) Output ¶
func (c *AsciiTransportServer) Output(buf []byte)
func (*AsciiTransportServer) OutputFrom ¶
func (c *AsciiTransportServer) OutputFrom(r io.Reader) error
func (*AsciiTransportServer) ReadLoop ¶
func (c *AsciiTransportServer) ReadLoop()
type Logger ¶
type Logger interface { Log(*asciiproto.Frame) Close() error }
func NewLogger ¶
func NewLogger(w io.WriteCloser) Logger
type Opt ¶
type Opt func(at *AsciiTransport)
func WithLogger ¶
func WithLogger(w io.WriteCloser) Opt
func WithReader ¶
func WithResizeHook ¶
func WithWriter ¶
Click to show internal directories.
Click to hide internal directories.