diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/c_glib/src/thrift/c_glib/transport/thrift_socket.h | 26 | ||||
-rw-r--r-- | lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.h | 9 |
2 files changed, 35 insertions, 0 deletions
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 c91f52f18..912929e81 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 0ca465a0f..dd07c6316 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 |