Re: BIO_set_nbio_accept

2009-06-18 Thread Domingo Kiser
. The BIO_set_nbio_accept macro defines a string literal "a" as the fourth argument to BIO_ctrl. The function definition for BIO_ctrl defines the fourth input argument to be void*. Thus the string literal when compiling via g++ is implicitly converted from const char* to const void*, bu

BIO_set_nbio_accept

2009-06-18 Thread Domingo Kiser
Does anyone have an answer to the following post from 2003? http://marc.info/?l=openssl-dev&m=104635293932621&w=2 List: openssl-dev Subject:BIO_set_nbio_accept From: "p b" Date: 2003-02-27 13:34:53 [Download message RAW] I use openssl openssl-0.9.7-st

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

Re: BIO_set_nbio_accept functionality

2007-09-11 Thread Jim Marshall
if (ret != NULL) { BIO_set_nbio_accept(ret, 1); BIO_set_bind_mode(ret, BIO_BIND_REUSEADDR); /* bind & listen */ if (BIO_do_accept(ret) < 0) ... Then i have a function called 'startListening" which I do the following: acceptRet = BIO_do_accept(

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) > { &

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

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

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

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

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, Ji

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

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 n

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

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

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