예제 #1
0
파일: Form1.cs 프로젝트: ztxyzu/FastHttpApi
 private void Form1_Load(object sender, EventArgs e)
 {
     SetIE();
     mHttpApiServer = new BeetleX.FastHttpApi.HttpApiServer();
     mHttpApiServer.Register(typeof(Form1).Assembly);
     mHttpApiServer.Open();
 }
예제 #2
0
 static void Main(string[] args)
 {
     mApiServer = new BeetleX.FastHttpApi.HttpApiServer();
     mApiServer.Register(typeof(Program).Assembly);
     mApiServer.Open();
     Console.Write(mApiServer.BaseServer);
     Console.Read();
 }
예제 #3
0
 static void Main(string[] args)
 {
     mApiServer = new BeetleX.FastHttpApi.HttpApiServer();
     mApiServer.Options.LogLevel     = BeetleX.EventArgs.LogType.Debug;
     mApiServer.Options.LogToConsole = true;
     mApiServer.Register(typeof(Program).Assembly);
     mApiServer.Open();
     Console.Write(mApiServer.BaseServer);
     Console.Read();
 }
예제 #4
0
        static void Main(string[] args)
        {
            mApiServer = new BeetleX.FastHttpApi.HttpApiServer();
            mApiServer.Options.LogLevel     = BeetleX.EventArgs.LogType.Debug;
            mApiServer.Options.LogToConsole = true;
            mApiServer.Options.SetDebug();
            mApiServer.Register(typeof(Program).Assembly);
            mApiServer.Open();
            //mApiServer.WebSocketReceive = (o, e) =>
            //{
            //    Console.WriteLine(e.Frame.Body);
            //    var freame = e.CreateFrame($"{DateTime.Now}" + e.Frame.Body.ToString());
            //    e.Response(freame);
            //};
            //mApiServer.WebSocketConnect = (o, e) => {
            //    //e.Request.Header
            //    //e.Request.Cookies
            //    e.Cancel = true;
            //};


            Console.Write(mApiServer.BaseServer);
            Console.Read();
        }