Path: blob/main/third_party/closure-compiler/node-externs/dgram.js
6172 views
/*1* Copyright 2012 The Closure Compiler Authors.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @fileoverview Definitions for node's dgram module. Depends on the events module.18* @see http://nodejs.org/api/dgram.html19* @see https://github.com/joyent/node/blob/master/lib/dgram.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var dgram = require('dgram');27END_NODE_INCLUDE28*/2930/**31* @type {Object.<string,*>}32*/33var dgram = {};3435/**36* @param {string} type37* @param {function(...)=} callback38* @return {dgram.Socket}39*/40dgram.createSocket = function(type, callback) {};4142/**43* @constructor44* @extends events.EventEmitter45*/46dgram.Socket = function() {};4748/**49* @param {nodeBuffer.Buffer} buf50* @param {number} offset51* @param {number} length52* @param {number} port53* @param {string} address54* @param {function(...)=} callback55*/56dgram.Socket.prototype.send = function(buf, offset, length, port, address, callback) {};5758/**59* @param {number} port60* @param {string=} address61*/62dgram.Socket.prototype.bind = function(port, address) {};6364/**65*/66dgram.Socket.prototype.close = function() {};6768/**69* @return {string}70*/71dgram.Socket.prototype.address = function() {};7273/**74* @param {boolean} flag75*/76dgram.Socket.prototype.setBroadcast = function(flag) {};7778/**79* @param {number} ttl80* @return {number}81*/82dgram.Socket.prototype.setTTL = function(ttl) {};8384/**85* @param {number} ttl86* @return {number}87*/88dgram.Socket.prototype.setMulticastTTL = function(ttl) {};8990/**91* @param {boolean} flag92*/93dgram.Socket.prototype.setMulticastLoopback = function(flag) {};9495/**96* @param {string} multicastAddress97* @param {string=} multicastInterface98*/99dgram.Socket.prototype.addMembership = function(multicastAddress, multicastInterface) {};100101/**102* @param {string} multicastAddress103* @param {string=} multicastInterface104*/105dgram.Socket.prototype.dropMembership = function(multicastAddress, multicastInterface) {};106107108