kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* kgio_trywrite raises "Broken pipe - send (Errno::EPIPE)"
@ 2012-04-09 23:00 Iñaki Baz Castillo
  2012-04-09 23:22 ` Iñaki Baz Castillo
  2012-04-10 20:15 ` Eric Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Iñaki Baz Castillo @ 2012-04-09 23:00 UTC (permalink / raw)
  To: kgio

Hi, I've realized that in certain cases Kgio::TCPSocket#kgio_trywrite
raises a "Broken pipe - send (Errno::EPIPE)" exception.

In my test case, I use Kgio::TCPSocket within EventMachine (using
EM.watch and so).

- Open the connection (*persistent* connection).

- Send a SIP request (like HTTP) to my custom server which replies a
SIP response.

- When "any data" is received (maybe not the entire SIP response since
I use kgio_tryread(40) for testing purposes) I send a *new* SIP
request.

- This means that, at some point, I send much more data than the received one.

- If when reading the received data with kgio_tryread(XXX), XXX is
equal or greater than the SIP response size, then there is no issue
and it works forever.

- But if XXX is less that the SIP response size, then at some point I
get an exception when calling to  Kgio::TCPSocket#kgio_trywrite:

    "Broken pipe - send (Errno::EPIPE)"


I assume this is since the TCP buffer is filled due to the above
"strange" test case. So I wonder, shouldn't kgio_trywrite return
:error_epipe? :)

-- 
Iñaki Baz Castillo
<ibc@aliax.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-10 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09 23:00 kgio_trywrite raises "Broken pipe - send (Errno::EPIPE)" Iñaki Baz Castillo
2012-04-09 23:22 ` Iñaki Baz Castillo
2012-04-10 20:15 ` Eric Wong
2012-04-10 20:56   ` Iñaki Baz Castillo

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.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).