networking.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!DOCTYPE html>
  2. <html lang="en-US">
  3. <head>
  4. <title>SlideScript API: Networking ~ The Lazy Language</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <meta name="description" content="SlideScript API and Documentation section - SlideScript is a micro stripting language with the intent to give the world an effective shell like experience with the ability to use a sloppy syntax! SlideScript can do simple every day shell tasks like manipulating and working with files, and directories, piping, variable support, and backquoting, with a bit of spice like: built-in md5, and encoder / decoder, webserver, networking functions, tar and compression functions, PLUS MORE!" />
  8. <link href="../style.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11. <table><tr><td>
  12. <div class="header">
  13. <img src="../sslogo.png" class="logoimg" title="SlideScript logo" alt="SlideScript" />
  14. </div>
  15. </td></tr><tr><td>
  16. <div class="menu"><!--
  17. --><a href="../index.html">Home</a><!--
  18. --><a href="index.html">Documentation</a><!--
  19. --><a href="https://notabug.org/Pentium44/slidescript">Git</a><!--
  20. --></div>
  21. </td></tr></table>
  22. <div class="container">
  23. <p>There are various functions within SlideScript in terms of networking availability.
  24. The micro web server is stable and 100% usable, and also incorporated: netlisten and nettoss.
  25. </p>
  26. <h2>SS:HTTP</h2>
  27. <p>
  28. SlideScript has, for convenience and ease of use at the prompt level,
  29. a built-in web server. The function is known as nethttp.<br />
  30. The function has the ability to fork into the background as an
  31. operational daemon until the SlideScript session is ended.
  32. When not forked, the web server runs in the foreground and
  33. will inform when a connection has been made and requests a file
  34. from the webserver.
  35. <pre><code>
  36. #!/bin/usr/slidescript
  37. # Starting the built-in web server
  38. # run in background!
  39. nethttp "8080" "1"
  40. chdir "docs"
  41. # run in foreground!
  42. nethttp "8081" "0"
  43. </code></pre>
  44. </p>
  45. <h2>Flat file listening server, and file tossing.</h2>
  46. <p>
  47. Amazingly convenient feature for passing raw text from machine
  48. to machine, and these functions are known as: netlisten and nettoss.
  49. <br />
  50. <b>Listening server:</b>
  51. <pre><code>
  52. #!/usr/bin/slidescript
  53. # Start listening server on port "7000"
  54. netlisten "7000"
  55. </code></pre>
  56. Incoming connections send data using the nettoss function and
  57. data is saved into a flat file in the working directory as a
  58. random filename based on time, srand, and rand in C.<br />
  59. <b>Tossing text / files to listening server:</b>
  60. <pre><code>
  61. ### Sending text / files via interactive shell ###
  62. ss:prompt: nettoss "127.0.0.1" "7000" "Hello!"
  63. ss:client:connected to 127.0.0.1:7000
  64. ss:prompt:
  65. ### Listening socket ###
  66. ss:server:listening on '7000'
  67. ss:server:connection from 127.0.0.1
  68. ss:server:client buffer saved as 'wQiHVlWxD595XZlk'
  69. </code></pre>
  70. </p>
  71. <h3>IRC server</h3>
  72. <p>
  73. Still need help? Want to report a bug? Join us!<br /><br />
  74. IP/Port: cddo.cc/1337<br />
  75. Main hang channel: <b>#theroot</b><br />
  76. FreeBox channel: <b>#freebox</b><br />
  77. FreonLinux channel: <b>#freonlinux</b>
  78. </p>
  79. </div>
  80. <div class="footer">
  81. &copy; Chris Dorman, 2021 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode">CC BY-NC-SA 4.0</a> - Software GPLv2 licensed<br />
  82. <p>
  83. Powered by:<br />
  84. <a href="https://freedns.afraid.org/">
  85. <img style="width:100px;" src="https://freedns.afraid.org/images/freedns_crop.png" />
  86. </a>
  87. <a href="https://letsencrypt.org/">
  88. <img style="width: 100px;" src="https://letsencrypt.org/images/le-logo-wide.png" />
  89. </a>
  90. <a href="http://jigsaw.w3.org/css-validator/check/referer">
  91. <img style="border:0;width:80px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" />
  92. </a>
  93. </p>
  94. </div>
  95. </body>
  96. </html>