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
88 lines (56 loc) · 2.71 KB
/
Server.cs
File metadata and controls
88 lines (56 loc) · 2.71 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
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace NodeJS.NetModule {
[Imported]
[ModuleName("net")]
[IgnoreNamespace]
public class Server : Socket {
public Server() {}
public Server(ServerOptions options) {}
public Server(Action<Socket> connectionListener) {}
public Server(ServerOptions options, Action<Socket> connectionListener) {}
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 MaxConnections { get; set; }
[IntrinsicProperty]
public int? Connections { get; set; }
public event Action OnListening {
[InlineCode("{this}.addListener('listening', {value})")] add {}
[InlineCode("{this}.removeListener('listening', {value})")] remove {}
}
[InlineCode("{this}.once('listening', {callback})")]
public void OnceListening(Action 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) {}
}
}