Changeset View
Changeset View
Standalone View
Standalone View
support/aphlict/server/lib/AphlictAdminServer.js
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | _handler: function(request, response) { | ||||
| }); | }); | ||||
| request.on('end', function() { | request.on('end', function() { | ||||
| try { | try { | ||||
| var msg = JSON.parse(body); | var msg = JSON.parse(body); | ||||
| self.getLogger().log( | self.getLogger().log( | ||||
| 'Received notification: ' + JSON.stringify(msg)); | 'Received notification: ' + JSON.stringify(msg)); | ||||
| ++this._messagesIn; | ++self._messagesIn; | ||||
| try { | try { | ||||
| self._transmit(msg); | self._transmit(msg); | ||||
| response.writeHead(200, {'Content-Type': 'text/plain'}); | response.writeHead(200, {'Content-Type': 'text/plain'}); | ||||
| } catch (err) { | } catch (err) { | ||||
| self.getLogger().log( | self.getLogger().log( | ||||
| '<%s> Internal Server Error! %s', | '<%s> Internal Server Error! %s', | ||||
| request.socket.remoteAddress, | request.socket.remoteAddress, | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||