git ssb

0+

ansuz / modern-dnsd



Tree: 012e32d5ba7c8cc7ea4d15234b2715ffc1f0e154

Files: 012e32d5ba7c8cc7ea4d15234b2715ffc1f0e154 / named.js

530 bytesRaw
1// Copyright 2012 Iris Couch, all rights reserved.
2//
3// The dnsd package API
4
5var Message = require('./message')
6var createServer = require('./server')
7
8module.exports = { 'parse': parse
9 , 'binify' : stringify
10 , 'stringify': stringify
11 , 'createServer': createServer
12 }
13
14function parse(packet) {
15 return new Message(packet)
16}
17
18function stringify(message) {
19 if(! (message instanceof Message))
20 message = new Message(message)
21 return message.toBinary()
22}
23

Built with git-ssb-web