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 pathSocket.cs
More file actions
87 lines (56 loc) · 2.15 KB
/
Socket.cs
File metadata and controls
87 lines (56 loc) · 2.15 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
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace NodeJS.NetModule {
[Imported]
[ModuleName("net")]
[IgnoreNamespace]
public class Socket : ReadWriteStream {
public Socket() {
}
public Socket(SocketOptions options) {
}
public void Connect(int port) {}
public void Connect(int port, string host) {}
public void Connect(int port, Action<Socket> connectListener) {}
public void Connect(int port, string host, Action<Socket> connectListener) {}
public void Connect(string path) {}
public void Connect(string path, Action<Socket> connectListener) {}
[IntrinsicProperty]
public int BufferSize { get; private set; }
public void SetTimeout(int timeout) {}
public void SetTimeout(int timeout, Action callback) {}
public void SetNoDelay() {}
public void SetNoDelay(bool noDelay) {}
public void SetKeepAlive(bool enable) {}
public void SetKeepAlive(bool enable, int initialDelay) {}
public SocketAddress Address { [ScriptName("address")] get; private set; }
[IntrinsicProperty]
public string RemoteAddress { get; private set; }
[IntrinsicProperty]
public int RemotePort { get; private set; }
[IntrinsicProperty]
public int BytesRead { get; private set; }
[IntrinsicProperty]
public int BytesWritten { get; private set; }
public event Action OnConnect {
[InlineCode("{this}.addListener('connect', {value})")] add {}
[InlineCode("{this}.removeListener('connect', {value})")] remove {}
}
[InlineCode("{this}.once('connect', {callback})")]
public void OnceConnect(Action callback) {}
public event Action OnTimeout {
[InlineCode("{this}.addListener('timeout', {value})")] add {}
[InlineCode("{this}.removeListener('timeout', {value})")] remove {}
}
[InlineCode("{this}.once('timeout', {callback})")]
public void OnceTimeout(Action callback) {}
public new event Action<bool> OnClose {
[InlineCode("{this}.addListener('close', {value})")] add {}
[InlineCode("{this}.removeListener('close', {value})")] remove {}
}
[InlineCode("{this}.once('close', {callback})")]
public void OnceClose(Action<bool> callback) {}
}
}