Skip to content

Releases: RobynLlama/SharpWebserver

v0.3.0

06 Feb 04:07
3cbcf64
Compare
Choose a tag to compare

New in 0.3.0

Listener Model changed to HTTPListener

  • Now uses an HTTPListener instead of a TCPListener
  • Program loop is now entirely async, old loop removed
    • Clients are accepted as they come
    • Requests are handled as they come
    • Old Client model removed
    • Old RequestInfo model removed

Webpage Interop modified

  • breaking!: IScriptPage now conforms to CreatePage(HttpListenerRequest request);

Extension methods / helpers added for parsing GET and POST arguments

Example usage available here

  • SharpWebserver.Extensions
    • GET Methods:
      • GetFirstOrDefault for keyname
      • GetFirstOrDefaultForAll for all keys
    • POST Methods:
      • GetDecodedFormData for all application/x-www-form-urlencoded
      • GetDecodedFormDataFirstOrDefault for all application/x-www-form-urlencoded

Example Pages

  • Added example solution
  • Updated all Examples to conform to the new Interop
  • Updated Index.cs to use the new extension methods and retrieve both GET and POST data

Full Changelog: v0.2.0...v0.3.0

v0.2.0

05 Feb 08:41
d1410b1
Compare
Choose a tag to compare

Warning

This release has a major bug in it that prevents it from accepting more than 1 client ever. It is kept for historic purposes only, do not attempt to use it.

New in 0.2.0

Main loop Async'd

  • Async callback for hearing clients
  • Async loop for serving requests

Webpages can reference assemblies

  • CS-Script compiler will search the /References/ folder for assemblies when building
  • Page runner will search the /References/ folder for assemblies when running in the domain
  • Assemblies referenced by scripts will be loaded into the domain as requested
  • Added a references command to view all assemblies that are currently loaded from the /References/ folder