/examples/README.md

http://github.com/OpenRTMFP/ArcusNode · Markdown · 19 lines · 17 code · 2 blank · 0 comment · 0 complexity · ceb32d0a3d088e3d4b94187bb7f64a93 MD5 · raw file

  1. # Examples
  2. #### using ArcusNode
  3. ## auth.js
  4. Here you find an example for a possible user authentication,
  5. failing the connection if the username and password are not given,
  6. rejecting the connection if the given credentials do not match
  7. and finally accepting the connection if the credentials are ok.
  8. To test this example, use the FLDev Flash project from the repository.
  9. With it you can specify comma separated arguments for a NetConnection.
  10. Run the auth example with
  11. <pre>
  12. $> node example/auth.js
  13. </pre>
  14. and then try connecting to the ip you are running the example on.
  15. You should the a message like _Connection 4 status: NetConnection.Connect.Failed_ in the bottom console.
  16. Now try giving the connection the arguments _"name,password"_ and you should be successfully connected.
  17. Try specifiying wrong credentials and you should see a _NetConnection.Connect.Rejected_ message.