Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ function Client(arg, port) {
return new Client(arg, port);
}

if (arg === undefined) {
throw new TypeError('arg should be a host address, name or universe');
}

this.host = Number.isInteger(arg) ? e131.getMulticastGroup(arg) : arg;
this.port = port || e131.DEFAULT_PORT;
this._socket = dgram.createSocket('udp4');
Expand All @@ -46,7 +42,7 @@ Client.prototype.createPacket = function createPacket(numSlots) {
// send E1.31 packet
Client.prototype.send = function send(packet, callback) {
callback = callback || function() {};
this._socket.send(packet.getBuffer(), this.port, this.host, function onSend() {
this._socket.send(packet.getBuffer(), this.port, this.host || e131.getMulticastGroup(packet.getUniverse()), function onSend() {
packet.incrementSequenceNumber();
callback();
});
Expand Down