A basic example
Modify the example to most of what you hope to achieve.
Search the community for 'chat' for more examples.
Herre is another example