diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-24 16:25:26 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-27 02:09:49 +0200 |
| commit | ea7a5452f40147a510ae8d9e5805d9252e7ddef9 (patch) | |
| tree | 0c0930203a29364b4969640948ef2905d8ab7e2e /src/netops.h | |
| parent | ce90a407c7b873780456b182d82d3ba26adbd182 (diff) | |
| download | libgit2-ea7a5452f40147a510ae8d9e5805d9252e7ddef9.tar.gz | |
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.h | 12 |
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); |
