Doing some fixup

This commit is contained in:
2024-03-30 20:01:24 -05:00
parent ee57c7a3ca
commit d07cd21b98
7 changed files with 401 additions and 13 deletions
@@ -3,6 +3,7 @@ using System.IO;
using System;
using System.Net;
using System.Text;
using System.Threading;
namespace Tesses.WebServer
{
@@ -71,6 +72,17 @@ internal class SizedStream : Stream
}
public class ServerContext
{
static Mutex mtx=new Mutex();
static long _unique=0;
public static long UniqueNumber()
{
mtx.WaitOne();
long u=_unique++;
mtx.ReleaseMutex();
return u;
}
const string bad_chars = "<>?/\\\"*|:";
public static string FixFileName(string filename,bool requireAscii=false)
{