浏览代码

Add function to wrap SSL_pending

svn:r501
Nick Mathewson 22 年之前
父节点
当前提交
798bb6ab3b
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      src/common/tortls.c
  2. 1 0
      src/common/tortls.h

+ 6 - 0
src/common/tortls.c

@@ -484,3 +484,9 @@ tor_tls_verify(tor_tls *tls)
   return r;
 }
 
+int 
+tor_tls_get_pending_bytees(tor_tls *tls)
+{
+  assert(tls);
+  return SSL_pending(tls->ssl);
+}

+ 1 - 0
src/common/tortls.h

@@ -26,5 +26,6 @@ int tor_tls_read(tor_tls *tls, char *cp, int len);
 int tor_tls_write(tor_tls *tls, char *cp, int n);
 int tor_tls_handshake(tor_tls *tls);
 int tor_tls_shutdown(tor_tls *tls);
+int tor_tls_get_pending_bytees(tor_tls *tls);
 
 #endif