X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fnetwork%2Ffd_socket_transmission.h;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fnetwork%2Ffd_socket_transmission.h;h=7999abd92c913220dd0ba9897838bd27b9047477;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git
diff --git a/src/type3_AndroidCloud/anbox-master/src/anbox/network/fd_socket_transmission.h b/src/type3_AndroidCloud/anbox-master/src/anbox/network/fd_socket_transmission.h
new file mode 100644
index 0000000..7999abd
--- /dev/null
+++ b/src/type3_AndroidCloud/anbox-master/src/anbox/network/fd_socket_transmission.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2014 Canonical Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ *
+ * Authored by: Kevin DuBois
+ */
+
+#ifndef ANBOX_NETWORK_FD_SOCKET_TRANSMISSION_H_
+#define ANBOX_NETWORK_FD_SOCKET_TRANSMISSION_H_
+
+#include "anbox/common/fd.h"
+
+#include
+#include
+#include
+
+namespace anbox {
+struct socket_error : std::system_error {
+ socket_error(std::string const& message);
+};
+
+struct socket_disconnected_error : std::system_error {
+ socket_disconnected_error(std::string const& message);
+};
+
+struct fd_reception_error : std::runtime_error {
+ fd_reception_error(std::string const& message);
+};
+
+bool socket_error_is_transient(int error_code);
+void send_fds(Fd const& socket, std::vector const& fd);
+void receive_data(Fd const& socket, void* buffer, size_t bytes_requested,
+ std::vector& fds);
+}
+
+#endif