Documentation
¶
Index ¶
- type Server
- func (s *Server) AddBus(bus *virtualbus.VirtualBus) error
- func (s *Server) Addr() string
- func (s *Server) Close() error
- func (s *Server) GetBus(busID uint32) *virtualbus.VirtualBus
- func (s *Server) GetListenPort() uint16
- func (s *Server) ListBuses() []uint32
- func (s *Server) ListenAndServe() error
- func (s *Server) NextFreeBusID() uint32
- func (s *Server) Ready() <-chan struct{}
- func (s *Server) RemoveBus(busID uint32) error
- func (s *Server) RemoveDeviceByID(busID uint32, deviceID string) error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddBus ¶
func (s *Server) AddBus(bus *virtualbus.VirtualBus) error
AddBus registers a bus with the server. If the bus number is already present, an error is returned.
func (*Server) GetBus ¶
func (s *Server) GetBus(busID uint32) *virtualbus.VirtualBus
GetBus returns a bus by ID or nil if not present.
func (*Server) GetListenPort ¶
GetListenPort extracts and returns the port number from the server's listen address.
func (*Server) ListenAndServe ¶
ListenAndServe starts the USB-IP server and handles incoming connections.
func (*Server) NextFreeBusID ¶ added in v0.3.0
func (*Server) Ready ¶
func (s *Server) Ready() <-chan struct{}
Ready returns a channel that is closed once the server has successfully bound to its listen address and is ready to accept connections.
Click to show internal directories.
Click to hide internal directories.