gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 01/39: http3: create http3 file, update Makefile.am and add .gi


From: gnunet
Subject: [gnunet] 01/39: http3: create http3 file, update Makefile.am and add .gitignore
Date: Sun, 25 Aug 2024 15:15:57 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 20de6a18dd13825151bf69b32ecb756fbe899908
Author: Shichao <mrrr61@outlook.com>
AuthorDate: Mon May 6 14:17:29 2024 +0800

    http3: create http3 file, update Makefile.am and add .gitignore
---
 src/service/transport/Makefile.am                 | 18 ++++++++-
 src/service/transport/gnunet-communicator-http3.c | 46 +++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)

diff --git a/src/service/transport/Makefile.am 
b/src/service/transport/Makefile.am
index eac451882..b3ecdfa59 100644
--- a/src/service/transport/Makefile.am
+++ b/src/service/transport/Makefile.am
@@ -97,7 +97,8 @@ libexec_PROGRAMS = \
  gnunet-service-transport \
  gnunet-communicator-unix \
  gnunet-communicator-udp \
- gnunet-communicator-tcp
+ gnunet-communicator-tcp \
+ gnunet-communicator-http3
 if HAVE_EXPERIMENTAL
 if HAVE_QUICHE
 libexec_PROGRAMS += \
@@ -166,6 +167,21 @@ gnunet_communicator_quic_LDADD = \
 endif
 endif
 
+gnunet_communicator_http3_SOURCES = \
+ gnunet-communicator-http3.c
+gnunet_communicator_http3_LDADD = \
+  libgnunettransportapplication.la \
+  libgnunettransportcommunicator.la \
+  $(top_builddir)/src/service/peerstore/libgnunetpeerstore.la \
+  $(top_builddir)/src/service/nat/libgnunetnatnew.la \
+  $(top_builddir)/src/service/statistics/libgnunetstatistics.la \
+  $(top_builddir)/src/lib/util/libgnunetutil.la \
+  -lngtcp2 \
+  -lgnutls \
+  -lngtcp2_crypto_gnutls \
+  -lnghttp3 \
+  $(LIBGCRYPT_LIBS)
+
 #gnunet_transport_SOURCES = \
 # gnunet-transport.c
 #gnunet_transport_LDADD = \
diff --git a/src/service/transport/gnunet-communicator-http3.c 
b/src/service/transport/gnunet-communicator-http3.c
new file mode 100644
index 000000000..9f17c8a02
--- /dev/null
+++ b/src/service/transport/gnunet-communicator-http3.c
@@ -0,0 +1,46 @@
+#include "platform.h"
+#include "gnunet_common.h"
+#include "gnunet_util_lib.h"
+
+#include <ngtcp2/ngtcp2.h>
+#include <ngtcp2/ngtcp2_crypto.h>
+#include <ngtcp2/ngtcp2_crypto_gnutls.h>
+#include <nghttp3/nghttp3.h>
+
+/**
+ * The main function for the UNIX communicator.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+  static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+    GNUNET_GETOPT_OPTION_END
+  };
+  int ret;
+
+  GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_DEBUG,
+                           "transport",
+                           "Starting http3 communicator\n");
+  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+    return 2;
+
+  ret = (GNUNET_OK ==
+         GNUNET_PROGRAM_run (argc,
+                             argv,
+                             "gnunet-communicator-http3",
+                             _ ("GNUnet HTTP3 communicator"),
+                             options,
+                             NULL,
+                             NULL))
+        ? 0
+        : 1;
+  GNUNET_free_nz ((void *) argv);
+  return ret;
+}
+
+
+/* end of gnunet-communicator-http3.c */
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]