This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d6a2d3  THRIFT-4272: warnings in glibc library Client: c_glib Patch: 
Zezeng Wang
0d6a2d3 is described below

commit 0d6a2d36ea02839313e63421fb1ba4a9de2604ea
Author: zeshuai007 <[email protected]>
AuthorDate: Tue Mar 24 18:31:37 2020 +0800

    THRIFT-4272: warnings in glibc library
    Client: c_glib
    Patch: Zezeng Wang
    
    This closes #2067
---
 .../src/thrift/c_glib/transport/thrift_socket.h    | 26 ++++++++++++++++++++++
 .../thrift/c_glib/transport/thrift_ssl_socket.h    |  9 ++++++++
 2 files changed, 35 insertions(+)

diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h 
b/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
index c91f52f..912929e 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h
@@ -68,6 +68,32 @@ struct _ThriftSocketClass
 /* used by THRIFT_TYPE_SOCKET */
 GType thrift_socket_get_type (void);
 
+/**
+ * Check if the socket is open and ready to send and receive
+ * @param transport
+ * @return true if open
+ */
+gboolean
+thrift_socket_is_open (ThriftTransport *transport);
+
+/**
+ * Open connection if required and set the socket to be ready to send and 
receive
+ * @param transport
+ * @param error
+ * @return true if operation was correct
+ */
+gboolean
+thrift_socket_open (ThriftTransport *transport, GError **error);
+
+/**
+ * Close connection if required
+ * @param transport
+ * @param error
+ * @return true if operation was correct
+ */
+gboolean
+thrift_socket_close (ThriftTransport *transport, GError **error);
+
 G_END_DECLS
 
 #endif
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.h 
b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.h
index 0ca465a..dd07c63 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.h
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.h
@@ -188,6 +188,15 @@ thrift_ssl_socket_is_open (ThriftTransport *transport);
 gboolean
 thrift_ssl_socket_open (ThriftTransport *transport, GError **error);
 
+/**
+ * Close connection if required
+ * @param transport
+ * @param error
+ * @return true if operation was correct
+ */
+gboolean
+thrift_ssl_socket_close (ThriftTransport *transport, GError **error);
+
 
 /**
  * @brief Initialization function

Reply via email to