[Freeswitch-dev] SSL_read in do_dtls() question

Iwan Budi Kusnanto ibk at labhijau.net
Thu Jul 25 13:19:27 MSD 2013


Hi,
Just curious, why use SSL_read in do_dtls() [1] while in the same time
Freeswitch use BIO_write.
Just wondering why not use BIO_read.

I replaced SSL_read with BIO_read and it is working fine with chrome
for few calls.
Not intensive test actually.
So, the line become if (BIO_read(dtls->write_bio, dtls->data,
dtls->bytes) == (int)dtls->bytes)

Another question, still in do_dtls() about this line:
BIO_write(dtls->read_bio, dtls->data, dtls->bytes)

Why use dtls->read_bio in write operation?

Why also need dtls->write_bio in my BIO_read above.
It seems weird for me

[1]https://github.com/FreeSWITCH/FreeSWITCH/blob/master/src/switch_rtp.c#L2376

-- 
Iwan Budi Kusnanto



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list