Skip to contentpackage
git-transport-protocol
v0.0.4a r/w stream that wraps a r/w stream and formats the data according to the git transfer protocol
node any5 depscjsopen source
- license
- MIT
- deps
- 5
- unpacked
- Unknown
- files
- Unknown
- node
- any
$npm install git-transport-protocol@0.0.4 README
GitHub-flavored package documentation.
downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
keywords
Tagged topics.
gittransportprotocolstream
dependencies
5 direct dependencies.
versions
Latest published May 14, 2014
contents
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
May 6, 2013
maintainers
Registry package owners.
=
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