Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/dgram.js
6172 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's dgram module. Depends on the events module.
19
* @see http://nodejs.org/api/dgram.html
20
* @see https://github.com/joyent/node/blob/master/lib/dgram.js
21
* @externs
22
* @author Daniel Wirtz <[email protected]>
23
*/
24
25
/**
26
BEGIN_NODE_INCLUDE
27
var dgram = require('dgram');
28
END_NODE_INCLUDE
29
*/
30
31
/**
32
* @type {Object.<string,*>}
33
*/
34
var dgram = {};
35
36
/**
37
* @param {string} type
38
* @param {function(...)=} callback
39
* @return {dgram.Socket}
40
*/
41
dgram.createSocket = function(type, callback) {};
42
43
/**
44
* @constructor
45
* @extends events.EventEmitter
46
*/
47
dgram.Socket = function() {};
48
49
/**
50
* @param {nodeBuffer.Buffer} buf
51
* @param {number} offset
52
* @param {number} length
53
* @param {number} port
54
* @param {string} address
55
* @param {function(...)=} callback
56
*/
57
dgram.Socket.prototype.send = function(buf, offset, length, port, address, callback) {};
58
59
/**
60
* @param {number} port
61
* @param {string=} address
62
*/
63
dgram.Socket.prototype.bind = function(port, address) {};
64
65
/**
66
*/
67
dgram.Socket.prototype.close = function() {};
68
69
/**
70
* @return {string}
71
*/
72
dgram.Socket.prototype.address = function() {};
73
74
/**
75
* @param {boolean} flag
76
*/
77
dgram.Socket.prototype.setBroadcast = function(flag) {};
78
79
/**
80
* @param {number} ttl
81
* @return {number}
82
*/
83
dgram.Socket.prototype.setTTL = function(ttl) {};
84
85
/**
86
* @param {number} ttl
87
* @return {number}
88
*/
89
dgram.Socket.prototype.setMulticastTTL = function(ttl) {};
90
91
/**
92
* @param {boolean} flag
93
*/
94
dgram.Socket.prototype.setMulticastLoopback = function(flag) {};
95
96
/**
97
* @param {string} multicastAddress
98
* @param {string=} multicastInterface
99
*/
100
dgram.Socket.prototype.addMembership = function(multicastAddress, multicastInterface) {};
101
102
/**
103
* @param {string} multicastAddress
104
* @param {string=} multicastInterface
105
*/
106
dgram.Socket.prototype.dropMembership = function(multicastAddress, multicastInterface) {};
107
108