mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Merge pull request #645 from jeromew/patch-1
Add Close/CloseComplete messages of wire protocol
This commit is contained in:
commit
03336139ef
@ -300,6 +300,11 @@ Connection.prototype.end = function() {
|
||||
this._send(0x58);
|
||||
};
|
||||
|
||||
Connection.prototype.close = function(msg, more) {
|
||||
this.writer.addCString(msg.type + (msg.name || ''));
|
||||
this._send(0x43, more);
|
||||
};
|
||||
|
||||
Connection.prototype.describe = function(msg, more) {
|
||||
this.writer.addCString(msg.type + (msg.name || ''));
|
||||
this._send(0x44, more);
|
||||
@ -364,6 +369,9 @@ Connection.prototype.parseMessage = function(buffer) {
|
||||
case 0x32: //2
|
||||
return new Message('bindComplete', length);
|
||||
|
||||
case 0x33: //3
|
||||
return new Message('closeComplete', length);
|
||||
|
||||
case 0x41: //A
|
||||
return this.parseA(buffer, length);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user