Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-06-24 18:25:26 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-06-27 04:09:49 +0400
commitea7a5452f40147a510ae8d9e5805d9252e7ddef9 (patch)
tree0c0930203a29364b4969640948ef2905d8ab7e2e /src/netops.h
parentce90a407c7b873780456b182d82d3ba26adbd182 (diff)
Add gitno_buffer as a recv wrapper
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/netops.h')
-rw-r--r--src/netops.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/netops.h b/src/netops.h
index 620fb12ea..9c5279822 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -4,6 +4,18 @@
#ifndef INCLUDE_netops_h__
#define INCLUDE_netops_h__
+typedef struct gitno_buffer {
+ void *data;
+ unsigned int len;
+ unsigned int offset;
+ int fd;
+} gitno_buffer;
+
+void gitno_buffer_setup(gitno_buffer *buf, void *data, unsigned int len, int fd);
+int gitno_recv(gitno_buffer *buf);
+void gitno_consume(gitno_buffer *buf, void *ptr);
+void gitno_consume_n(gitno_buffer *buf, unsigned int cons);
+
int gitno_connect(const char *host, const char *port);
int gitno_send(int s, const char *msg, int len, int flags);