yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: yahns-public@yhbt.net
Subject: [PATCH] update comments about wbuf_close return values
Date: Sat, 24 Jan 2015 00:25:27 +0000	[thread overview]
Message-ID: <1422059128-3998-1-git-send-email-e@80x24.org> (raw)

The state management has evolved slightly over time,
so update the comments to reflect that.
---
 lib/yahns/stream_file.rb | 4 +++-
 lib/yahns/wbuf_common.rb | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/stream_file.rb b/lib/yahns/stream_file.rb
index 793f0de..fabbb9d 100644
--- a/lib/yahns/stream_file.rb
+++ b/lib/yahns/stream_file.rb
@@ -36,7 +36,9 @@ def initialize(body, persist, offset, count)
     @body = body
   end
 
-  # called by last wbuf_flush
+  # called by last wbuf_flush,
+  # returns true / false for persistent/non-persistent connections,
+  # :ignore for hijacked connections
   def wbuf_close(client)
     @tmpio.close if NeedClose === @tmpio
     wbuf_close_common(client)
diff --git a/lib/yahns/wbuf_common.rb b/lib/yahns/wbuf_common.rb
index 0ce4526..9e2d855 100644
--- a/lib/yahns/wbuf_common.rb
+++ b/lib/yahns/wbuf_common.rb
@@ -9,7 +9,9 @@
 end
 
 module Yahns::WbufCommon # :nodoc:
-  # returns nil on success, :wait_*able when blocked
+  # returns true / false for persistent/non-persistent connections
+  # returns :wait_*able when blocked
+  # returns :ignore if hijacked
   # currently, we rely on each thread having exclusive access to the
   # client socket, so this is never called concurrently with wbuf_write
   def wbuf_flush(client)
-- 
EW


                 reply	other threads:[~2015-01-24  0:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422059128-3998-1-git-send-email-e@80x24.org \
    --to=e@80x24.org \
    --cc=yahns-public@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	http://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).