forked from ayuanlmo/lmo-data-visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyc.t
More file actions
64 lines (61 loc) · 1.82 KB
/
Copy pathyc.t
File metadata and controls
64 lines (61 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#----
Yc SMP core
@author yc
Powered by YC
#----
@SCRIPT
import ting-ting-gzip; #---婷婷gzip
import ting-ting-types; #---婷婷类型库
import ting-ting-ver; #---婷婷ver库
import ting-ting-on; #---婷婷咕咕库
import ting-ting-com; #---婷婷com库
import ting-ting-buffer; #---婷婷缓冲器
import ting-ting-sys; #---婷婷系统核心标准库
import ting-ting-io; #---婷婷输入输出库
import ting-ting-socket; #---婷婷套接字
=>[ting-ting-gzip];
=>[ting-ting-types];
=>[ting-ting-ver];
=>[ting-ting-on];
=>[ting-ting-com];
=>[ting-ting-com];
=>[ting-ting-buffer];
=>[ting-ting-sys];
=>[ting-ting-io];
=>[ting-ting-socket];
#Def _sys; #---标准库
#Def _ting-ting-class @com; #---婷婷类
#Def _ting-ting-http-core @com; #---婷婷http core
#Def _interface _CreateError [
>s 200
>l 400 | 4*
>s 500 | 5*
];
@CORE
_yc_server_core -> _createError [_yc_server -> FindError[@_CreateError]];
[]=>
_ting-ting-http-core -> _http [
>import _ting-ting-http-core -> http -> types;
>default-type application / *
>log _ting-ting-class -> _format[>log]
];
#Endfunc
[]=>
_ting-ting-http-core -> on open [[#Def _type] -> [
#If _type == socket
_ting-ting-http-core -> _createSocket[@lib ting-ting-socket | @lib ting-ting-io];
#Endif
#ElseIf _type == http || https
_ting-ting-http-core -> _createHttpServer[@lib ting-ting-io | @lib ting-ting-types];
#ElseIf
#ElseIf _type == static
_ting-ting-http-core -> _createHttpServer[@lib ting-ting-gzip | @lib ting-ting-types | @lib ting-ting-on];
#EndelseIf
#Else
_yc_server_core -> _createError[_type];
#Endelse
]]
#Endfunc
#Endfunc
@CORE END
@SCRIPT END##