Documentation ¶
Index ¶
- Variables
- func Unmarsall(bts []byte, v interface{}) error
- type BytesMessage
- type Component
- type Controller
- type Device
- type EdgeRouter
- type Initer
- type SerialSeekHandler
- type SerialSeeker
- type Server
- type TcpClient
- func (c *TcpClient) Close(toDel *net.TCPConn)
- func (c *TcpClient) Connect(to string) error
- func (c *TcpClient) DeleteConn(toDel net.Conn)
- func (c *TcpClient) GetConn(to string, unexceptedConns []net.Conn) (conn net.Conn, err error)
- func (c *TcpClient) Init()
- func (c *TcpClient) PacketReceived(bts []byte, conn *net.TCPConn) int
- func (c *TcpClient) SetController(ctrl Controller)
- func (c *TcpClient) String() string
- type TcpHandler
- type TcpServer
- func (c *TcpServer) Close(toDel *net.TCPConn)
- func (c *TcpServer) Connect(to string) error
- func (c *TcpServer) DeleteConn(toDel net.Conn)
- func (c *TcpServer) GetConn(to string, unexceptedConns []net.Conn) (conn net.Conn, err error)
- func (s *TcpServer) Init() (err error)
- func (c *TcpServer) PacketReceived(bts []byte, conn *net.TCPConn) int
- func (s *TcpServer) Run()
- func (c *TcpServer) SetController(ctrl Controller)
- func (c *TcpServer) String() string
- type Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var NoSuchConnection = errors.New("no such connection")
Functions ¶
Types ¶
type BytesMessage ¶
func NewBytesMessage ¶
func NewBytesMessage(v interface{}, to string, d Device) *BytesMessage
type Component ¶
type Component struct { ER EdgeRouter Server Server Trans Transport Ctrl Controller }
type Controller ¶
type EdgeRouter ¶
type EdgeRouter struct { Name string Plugins map[string]interface{} // contains filtered or unexported fields }
func Organize ¶
func Organize(name string, plugins ...interface{}) *EdgeRouter
func (*EdgeRouter) ConfigBy ¶
func (er *EdgeRouter) ConfigBy(filename string) error
func (*EdgeRouter) ConfigByString ¶
func (er *EdgeRouter) ConfigByString(str string) error
func (*EdgeRouter) Run ¶
func (er *EdgeRouter) Run()
type SerialSeekHandler ¶
type SerialSeekHandler interface { PacketSend() []*BytesMessage SeekReceived([]byte, Device) (handled_length int, shouldStartNew bool) }
type SerialSeeker ¶
func (*SerialSeeker) Init ¶
func (s *SerialSeeker) Init() (err error)
func (*SerialSeeker) OnReceived ¶
func (s *SerialSeeker) OnReceived(bts []byte, conn net.Conn) int
func (*SerialSeeker) Run ¶
func (s *SerialSeeker) Run()
func (*SerialSeeker) SetHandler ¶
func (s *SerialSeeker) SetHandler(handler interface{}) error
func (*SerialSeeker) SetTransport ¶
func (s *SerialSeeker) SetTransport(t Transport)
func (*SerialSeeker) String ¶
func (s *SerialSeeker) String() string
type TcpClient ¶
type TcpClient struct { Port int // contains filtered or unexported fields }
func (*TcpClient) DeleteConn ¶
TODO client should reconnect to server
func (*TcpClient) PacketReceived ¶
func (*TcpClient) SetController ¶
func (c *TcpClient) SetController(ctrl Controller)
type TcpHandler ¶
type TcpServer ¶
type TcpServer struct { Port int // contains filtered or unexported fields }
func (*TcpServer) DeleteConn ¶
func (*TcpServer) PacketReceived ¶
func (*TcpServer) SetController ¶
func (c *TcpServer) SetController(ctrl Controller)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.