This repository was archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathServer.cs
More file actions
128 lines (85 loc) · 4.26 KB
/
Server.cs
File metadata and controls
128 lines (85 loc) · 4.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using NodeJS.BufferModule;
using NodeJS.EventsModule;
using NodeJS.NetModule;
namespace NodeJS.HttpModule {
[Imported]
[ModuleName("http")]
[IgnoreNamespace]
public class Server : EventEmitter {
public Server() {}
public Server(Action<ServerRequest, ServerResponse> requestListener) {}
public void Listen(int port) {}
public void Listen(int port, string hostname) {}
public void Listen(int port, string hostname, int backlog) {}
public void Listen(int port, Action callback) {}
public void Listen(int port, string hostname, Action callback) {}
public void Listen(int port, string hostname, int backlog, Action callback) {}
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'listen', {port})")]
public Task ListenTask(int port) { return null; }
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'listen', {port}, {hostname})")]
public Task ListenTask(int port, string hostname) { return null; }
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'listen', {port}, {hostname}, {backlog})")]
public Task ListenTask(int port, string hostname, int backlog) { return null; }
public void Listen(string path) {}
public void Listen(string path, Action callback) {}
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'listen', {path})")]
public Task ListenTask(string path) { return null; }
public void Listen(object handle) {}
public void Listen(object handle, Action callback) {}
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'listen', {handle})")]
public Task ListenTask(object handle) { return null; }
public void Close() {}
public void Close(Action callback) {}
[InlineCode("{$System.Threading.Tasks.Task}.fromDoneCallback({this}, 'close')")]
public Task CloseTask() { return null; }
[IntrinsicProperty]
public int MaxHeadersCount { get; set; }
public event Action<ServerRequest, ServerResponse> OnRequest {
[InlineCode("{this}.addListener('request', {value})")] add {}
[InlineCode("{this}.removeListener('request', {value})")] remove {}
}
[InlineCode("{this}.once('request', {callback})")]
public void OnceRequest(Action<ServerRequest, ServerResponse> callback) {}
public event Action<Socket> OnConnection {
[InlineCode("{this}.addListener('connection', {value})")] add {}
[InlineCode("{this}.removeListener('connection', {value})")] remove {}
}
[InlineCode("{this}.once('connection', {callback})")]
public void OnceConnection(Action<Socket> callback) {}
public event Action OnClose {
[InlineCode("{this}.addListener('close', {value})")] add {}
[InlineCode("{this}.removeListener('close', {value})")] remove {}
}
[InlineCode("{this}.once('close', {callback})")]
public void OnceClose(Action callback) {}
public event Action<ServerRequest, ServerResponse> OnCheckContinue {
[InlineCode("{this}.addListener('checkContinue', {value})")] add {}
[InlineCode("{this}.removeListener('checkContinue', {value})")] remove {}
}
[InlineCode("{this}.once('checkContinue', {callback})")]
public void OnceCheckContinue(Action<ServerRequest, ServerResponse> callback) {}
public event Action<ServerRequest, Socket, Buffer> OnConnect {
[InlineCode("{this}.addListener('connect', {value})")] add {}
[InlineCode("{this}.removeListener('connect', {value})")] remove {}
}
[InlineCode("{this}.once('connect', {callback})")]
public void OnceConnect(Action<ServerRequest, Socket, Buffer> callback) {}
public event Action<ServerRequest, Socket, Buffer> OnUpgrade {
[InlineCode("{this}.addListener('upgrade', {value})")] add {}
[InlineCode("{this}.removeListener('upgrade', {value})")] remove {}
}
[InlineCode("{this}.once('upgrade', {callback})")]
public void OnceUpgrade(Action<ServerRequest, Socket, Buffer> callback) {}
public event Action<Error> ClientError {
[InlineCode("{this}.addListener('clientError', {value})")] add {}
[InlineCode("{this}.removeListener('clientError', {value})")] remove {}
}
[InlineCode("{this}.once('clientError', {callback})")]
public void OnceClientError(Action<Error> callback) {}
}
}