Hi,

I didn't want to start another thread about this two I/O functions.
For starters (like me) on this two I/O calls, things get a bit
confusing at the beggining. I used to read man pages and doc before
asking something that I don't know and gather information about it to
try to resolve the problem myself and don't bother anyone. But when I
get stuck in specifics problems that I can't find answers I don't have
any other thing to do than:

a) nothing.
b) ask.

I preffer b.

As David said in an older thread, I can think of the API as a state
machine and then, regarding how much progress we get, do something.
Considering this, I have some doubts about a communication between
server and clients. Let's say we write a client that in his nature,
it's not a desired client. But, he connects, he handshakes and he
authenticates, and he behaves improperly. For example, when the server
sends him the data he required, he doesn't read it.

(I forgot to mention the use of non-blocking I/O)
A break here in that scenario: SSL_write() will not make further
success on writting to that client and SSL_get_error() will yield
WANT_WRITE or WANT_READ and we can use select() to decide which action
must be taken. If this is correct, I have some doubts about how to
implement a server that does overcome this issue with large amount of
data without letting the others clients hang in for the timeout we can
set on select() for example. I want to avoid the timeout because i'm
not pretty sure which value to use as we are communicating through a
network and I think that using small values could lead to avoid a
client that is slow on receiving data (I could be wrong in this
thinking).

Others things are to instantaneously put that client in a wait list
when SSL_write() could not succed, continue with the others, and try
with that client again later. But, sometimes we can get a WANT_WRITE
or WANT_READ when renegotiating so this does not appears a solution.
That "zombie client" thing makes SSL_write() "block". So, if the
client we are sending data does not read it, do we have some especial
error, function or something that the API provides us? Or do we think
on a workaround for it?

Maybe this sound like an implementation issue, but in fact I didn't
find information that tell us this scenario. I read on the possibility
of using the error pending on select() and the sockets error but no
one seems to be useful (at least for me) on this issue.

Thanks in advance,
Regards,

-- 
If you want freedom, compile the source. Get gentoo.

Sebastián Treu
http://labombiya.com.ar
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to