Re: BIO_set_nbio_accept functionality

2007-09-11 Thread Jim Marshall
Jim Fox wrote: So beyond the BIO_do_accept, I used the openssl client program to connect to my server. I was expecting the above to make all the sockets non-blocking, but when I called SSL_read in my code it seems to block for data. I tried using the BIO_set_nbio an BIO_set_nbio_accept cal

Re: BIO_set_nbio_accept functionality

2007-09-11 Thread Jim Marshall
Dr. Stephen Henson wrote: On Fri, Sep 07, 2007, Jim Marshall wrote: Thanks for the feedback, unfortunately I don't fully follow you. In my code I have a 'opensocket' function in which I do this: ret = BIO_new_accept(hostString); if (ret != NULL) { BIO_set_n

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Dr. Stephen Henson
On Fri, Sep 07, 2007, Jim Marshall wrote: > Thanks for the feedback, unfortunately I don't fully follow you. > > In my code I have a 'opensocket' function in which I do this: > > ret = BIO_new_accept(hostString); > if (ret != NULL) > { > BIO_set_nbio_accept(ret,

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Jim Fox
So beyond the BIO_do_accept, I used the openssl client program to connect to my server. I was expecting the above to make all the sockets non-blocking, but when I called SSL_read in my code it seems to block for data. I tried using the BIO_set_nbio an BIO_set_nbio_accept calls but no joy.

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Jim Marshall
Dr. Stephen Henson wrote: On Fri, Sep 07, 2007, Jim Marshall wrote: Jim Fox wrote: Use "BIO_set_nbio_accept" and this will work as you want it to. Jim Arg, thanks Jim - somewhere along the line I mixed that up! Changing to that causes the BIO_do_accept call to not block. Although BIO_do_acc

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Dr. Stephen Henson
On Fri, Sep 07, 2007, Jim Marshall wrote: > Jim Fox wrote: > > > >Use "BIO_set_nbio_accept" and this will work as you want it to. > > > >Jim > > > > Arg, thanks Jim - somewhere along the line I mixed that up! Changing to > that causes the BIO_do_accept call to not block. Although BIO_do_accept

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Jim Marshall
Jim Fox wrote: Use "BIO_set_nbio_accept" and this will work as you want it to. Jim Arg, thanks Jim - somewhere along the line I mixed that up! Changing to that causes the BIO_do_accept call to not block. Although BIO_do_accept returns -1 and errno is set to EAGAIN, the SSL_get_error() func

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Jim Fox
Use "BIO_set_nbio_accept" and this will work as you want it to. Jim Thanks for the feedback, but the BIO_set_nbio still doesn't seem to work. Here is what I am doing. I have a function which creates the accept BIO and calls BIO_set_nbio as follows (this is obviously trimmed down from

Re: BIO_set_nbio_accept functionality

2007-09-07 Thread Jim Marshall
Dr. Stephen Henson wrote: On Tue, Sep 04, 2007, Jim Marshall wrote: Jim Fox wrote: Doesn't need a faq. The man page says the purpose of the BIO_set_nbio_accept macro is to set blocking or non-blocking mode. Seems like that's what it will do. Jim On Sep 3, 2007, at 11:31 AM, Jim Marshall

Re: BIO_set_nbio_accept functionality

2007-09-04 Thread Dr. Stephen Henson
On Tue, Sep 04, 2007, Jim Marshall wrote: > Jim Fox wrote: > > > >Doesn't need a faq. The man page says the purpose of the > >BIO_set_nbio_accept macro is to set blocking or non-blocking mode. > >Seems like that's what it will do. > > > >Jim > > > >On Sep 3, 2007, at 11:31 AM, Jim Marshall wro

Re: BIO_set_nbio_accept functionality

2007-09-04 Thread Jim Marshall
Jim Fox wrote: Doesn't need a faq. The man page says the purpose of the BIO_set_nbio_accept macro is to set blocking or non-blocking mode. Seems like that's what it will do. Jim On Sep 3, 2007, at 11:31 AM, Jim Marshall wrote: Jim Marshall wrote: I'm looking at using non-blocking I/O in

Re: BIO_set_nbio_accept functionality

2007-09-03 Thread Jim Fox
Doesn't need a faq. The man page says the purpose of the BIO_set_nbio_accept macro is to set blocking or non-blocking mode. Seems like that's what it will do. Jim On Sep 3, 2007, at 11:31 AM, Jim Marshall wrote: Jim Marshall wrote: I'm looking at using non-blocking I/O in some places i

Re: BIO_set_nbio_accept functionality

2007-09-03 Thread Jim Marshall
Jim Marshall wrote: I'm looking at using non-blocking I/O in some places in my code, and I have a question. The 'BIO_set_nbio_accept' says it will set the underlying socket to blocking/non-blocking mode, but all the examples and stuff I see say to use 'BIO_socket_ioctl(SSL_get_fd(ssl),FIONBIO,

BIO_set_nbio_accept functionality

2007-08-30 Thread Jim Marshall
I'm looking at using non-blocking I/O in some places in my code, and I have a question. The 'BIO_set_nbio_accept' says it will set the underlying socket to blocking/non-blocking mode, but all the examples and stuff I see say to use 'BIO_socket_ioctl(SSL_get_fd(ssl),FIONBIO,&sl)'. Can 'BIO_set_