@@ -17,7 +17,7 @@ public class QuickMan
17
17
private int _Port = 1999 ;
18
18
private Dictionary < string , Action < HttpListenerContext > > _Endpoints ;
19
19
20
- public static int _MaxSimultaneousConnections = 20 ;
20
+ private static int _MaxSimultaneousConnections = 20 ;
21
21
private Semaphore sem = new Semaphore ( _MaxSimultaneousConnections , _MaxSimultaneousConnections ) ;
22
22
23
23
/// <summary>
@@ -112,17 +112,17 @@ private void Listen()
112
112
#endregion
113
113
#region Server Misc.
114
114
115
- public void PrintLine ( string String )
115
+ private void PrintLine ( string String )
116
116
{
117
117
Console . WriteLine ( Tag ( String ) ) ;
118
118
}
119
119
120
- public string Tag ( string Text )
120
+ private string Tag ( string Text )
121
121
{
122
122
return "[" + DateTime . Now . ToShortDateString ( ) + " " + DateTime . Now . ToShortTimeString ( ) + "] " + Text ;
123
123
}
124
124
125
- public string GetLocalIP ( )
125
+ private string GetLocalIP ( )
126
126
{
127
127
using ( System . Net . Sockets . Socket Socket = new System . Net . Sockets . Socket ( System . Net . Sockets . AddressFamily . InterNetwork , System . Net . Sockets . SocketType . Dgram , 0 ) )
128
128
{
@@ -131,7 +131,7 @@ public string GetLocalIP()
131
131
}
132
132
}
133
133
134
- public void AllowListener ( string URL )
134
+ private void AllowListener ( string URL )
135
135
{
136
136
string command = $ "http add urlacl url={ new Uri ( URL ) . AbsoluteUri } user=Everyone";
137
137
System . Diagnostics . Process . Start ( new System . Diagnostics . ProcessStartInfo ( "netsh" , command ) { WindowStyle = ProcessWindowStyle . Hidden , CreateNoWindow = true , Verb = "runas" } ) ;
@@ -219,7 +219,7 @@ public void Respond(FileStream Response, string ContentType, HttpListenerContext
219
219
Context . Response . OutputStream . Flush ( ) ;
220
220
}
221
221
222
- public Stream StringToStream ( string s )
222
+ private Stream StringToStream ( string s )
223
223
{
224
224
var stream = new MemoryStream ( ) ;
225
225
var writer = new StreamWriter ( stream ) ;
0 commit comments