0.1.0 • Published 10 years ago

git-transport-protocol v0.1.0

Weekly downloads
51,495
License
MIT
Repository
github
Last release
10 years ago

git-transport-protocol

wrap a r/w stream in this transport r/w stream for transforming writes into valid git packet lines, and reads from git packet lines into JS objects.

var net = require('net')
  , transport = require('git-transport-protocol')
  , client
  , tcp

tcp = net.connect({host: 'github.com', port: 9418})

client = transport(tcp)

client.on('data', function(data) {
  // data will be JS objects
})

// start a fetch
client.write('git-upload-pack /chrisdickinson/plate.git\0host=github.com\0')

API

transport(connection) -> client

wrap any readable/writable stream with git-packet-line senders and receivers.

client.setRawMode(true) -> rawmode boolean

enter or exit "raw" mode -- this makes writes skip the pkt-write portion of the stream and go directly to the connection.

this is useful for, e.g., sending packfile data.

License

MIT

0.1.0

10 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago