uecho.frame package
Submodules
uecho.frame.interface module
uecho.frame.manager module
uecho.frame.multicast_server module
uecho.frame.observer module
uecho.frame.server module
- class uecho.frame.server.Server
Bases:
Thread- PORT = 3610
- add_observer(observer) bool
Adds a message observer to the subject.
- Parameters:
Observer (observer) – A message observer.
- Returns:
Returns True when the specified observer is added, Otherwise False.
- Return type:
bool
- bind(ifaddr: str) bool
- create_udp_socket() socket
- ifaddr: str
- notify(msg: Message)
Notifies the specified message to the added observers.
- Parameters:
msg (Message) – A notify message
- port: int
- run()
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- sock: socket | None
- start() Any
Start the thread’s activity.
It must be called at most once per thread object. It arranges for the object’s run() method to be invoked in a separate thread of control.
This method will raise a RuntimeError if called more than once on the same thread object.
- stop() Any