diffusion
Version:
Diffusion JavaScript client
24 lines (17 loc) • 583 B
JavaScript
function CommandHeader(service, cid) {
this.service = service;
this.cid = cid;
}
CommandHeader.prototype.toString = function() {
return '<' + this.service + ', ' + this.cid.toString() + '>';
};
CommandHeader.createRequestHeader = function(service, cid) {
return new CommandHeader(service, cid);
};
CommandHeader.prototype.createResponseHeader = function() {
return new CommandHeader(this.service, this.cid);
};
CommandHeader.prototype.createErrorHeader = function() {
return new CommandHeader(this.service, this.cid);
};
module.exports = CommandHeader;