Doing some fixup
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user