From df3417c5b78760da885727ca08c6b41ca4c52cd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= <bjourne@gmail.com>
Date: Fri, 18 Apr 2014 18:42:00 +0200
Subject: [PATCH] io.sockets.secure.openssl: more docs

---
 .../secure/openssl/openssl-docs.factor        | 30 ++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/basis/io/sockets/secure/openssl/openssl-docs.factor b/basis/io/sockets/secure/openssl/openssl-docs.factor
index 0ff6903fe6..f917621d17 100644
--- a/basis/io/sockets/secure/openssl/openssl-docs.factor
+++ b/basis/io/sockets/secure/openssl/openssl-docs.factor
@@ -1,4 +1,5 @@
-USING: help.markup help.syntax kernel strings sequences ;
+USING: help.markup help.syntax io.files io.buffers kernel openssl.libssl
+strings sequences ;
 IN: io.sockets.secure.openssl
 
 HELP: subject-name
@@ -18,3 +19,30 @@ HELP: subject-names-match?
 HELP: alternative-dns-names
 { $values { "certificate" "an SSL peer certificate" } { "dns-names" sequence } }
 { $description "Alternative subject names for the certificate." } ;
+
+HELP: do-ssl-connect
+{ $values { "ssl-handle" ssl-handle } }
+{ $description "Connects the SSL handle to the remote server. Blocks until the connection is established or an error is thrown." } ;
+
+HELP: do-ssl-read
+{ $values
+  { "buffer" buffer }
+  { "ssl" SSL }
+  { "event/f" "f or a symbol indicating the desired operation" } }
+{ $description "Reads from the ssl connection to the buffer." } ;
+
+HELP: do-ssl-write
+{ $values
+  { "buffer" buffer }
+  { "ssl" SSL }
+  { "event/f" "f or a symbol indicating the desired operation" } }
+{ $description "Writes from the buffer to the ssl connection." } ;
+
+HELP: check-ssl-error
+{ $values
+  { "ssl" SSL }
+  { "ret" "error code returned by an SSL function" }
+  { "exra-cases/f" "f or an assoc of error codes and quotations" }
+  { "event/f" "f or a symbol indicating the desired operation" }
+}
+{ $description "Checks if the last SSL function returned successfully or not. If so, returns " { $link f } " or a symbol, " { $link +input+ } " or " { $link +output+ } ", that indicates the socket operation required by libssl." } ;