]>
git.proxmox.com Git - libgit2.git/blob - src/netops.h
2 * Copyright (C) 2009-2011 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_netops_h__
8 #define INCLUDE_netops_h__
11 typedef int GIT_SOCKET
;
13 typedef unsigned int GIT_SOCKET
;
16 typedef struct gitno_buffer
{
23 void gitno_buffer_setup(gitno_buffer
*buf
, char *data
, unsigned int len
, int fd
);
24 int gitno_recv(gitno_buffer
*buf
);
25 void gitno_consume(gitno_buffer
*buf
, const char *ptr
);
26 void gitno_consume_n(gitno_buffer
*buf
, size_t cons
);
28 int gitno_connect(const char *host
, const char *port
);
29 int gitno_send(int s
, const char *msg
, size_t len
, int flags
);
30 int gitno_select_in(gitno_buffer
*buf
, long int sec
, long int usec
);