mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 05:06:04 +00:00
Update msmq.js
This commit is contained in:
parent
c0f8159735
commit
cfb2c65541
|
@ -28,10 +28,12 @@ var MSMQObject = function(queueName) {
|
|||
} catch (e) {
|
||||
console.error("MSMQObject.create() ->", e.message);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
this.open = function() {
|
||||
this.queue = this.queueInfo.Open(MQ_SEND_ACCESS, MQ_DENY_NONE);
|
||||
return this;
|
||||
}
|
||||
|
||||
// For example: .send("Sample Body", "LabelXX");
|
||||
|
@ -40,7 +42,7 @@ var MSMQObject = function(queueName) {
|
|||
mqmsg.Body = body
|
||||
mqmsg.Label = label
|
||||
mqmsg.Send(this.queue);
|
||||
mqmsg = null;
|
||||
return mqmsg;
|
||||
};
|
||||
|
||||
this.recv = function() {
|
||||
|
@ -49,3 +51,8 @@ var MSMQObject = function(queueName) {
|
|||
|
||||
this.create();
|
||||
};
|
||||
|
||||
exports.MSMQObject = MSMQObject;
|
||||
exports.open = function(queueName) {
|
||||
return (new MSMQObject(queueName)).open();
|
||||
};
|
Loading…
Reference in New Issue
Block a user