simplechat.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <messages>
  3. <message id="introduction">
  4. <h2><span>Wt Chat client</span></h2>
  5. <p>This is a multi-user chat client and server.</p>
  6. <p>To keep the example simple, server and clients all run in the same
  7. process. Still, because all I/O in Wt is asynchronous even when using
  8. "server push" which requires an open connection with each client at
  9. all times, clients do not tie up threads, and as such the application
  10. could easily support thousands of simultaneous users as well.</p>
  11. <p>The client is contained in a widget (SimpleChatWidget), and can be
  12. instantiated as many times as you like, even in the same
  13. application.<br />
  14. Because of the widget abstraction, it is straight forward to include a
  15. chat client in your own application, by linking both the client and
  16. server classes into your application.</p>
  17. </message>
  18. <message id="details">
  19. <p>The implementation uses server-initiated updates, a feature that is
  20. not much different from regular client-server communication in Wt, and
  21. allows updating a session from outside its regular event loop. When a
  22. message is received, the user interface (i.e. widget tree) not only of
  23. the current session, but also of all other sessions is updated and
  24. "pushed" to these clients simultanously.</p>
  25. </message>
  26. <message id="serverpushwarning">Note, you do not have JavaScript and this chat will have degraded functionality</message>
  27. <message id="join-msg.template">
  28. <span class='chat-info'>You are joining as ${name}.</span>
  29. </message>
  30. </messages>