osdir.com
mailing list archive

Subject: iostream for ssl? - msg#00103

List: lib.boost.asio.user

Date: Prev Next Index Thread: Prev Next Index
Are there any options in asio for making an SSL connection behave
like an iostream, similar to how ip::tcp::iostream works for non-SSL
connections? It looks like the only option is to use a ssl::stream
object, which is far more difficult to use for a simple, blocking
application (IMHO).

Thanks,
-Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Checking for success with in a TCP client

Simon Pickles: > else if (endpoint_iterator != tcp::resolver::iterator()) > > What exactly does this line do? This line checks if the variable endpoint_iterator is an empty or rather default constructed asio::ip::tcp::resolver::iterator. Therefore you can try to connect to this endpoint by dereferencing it. Hope that helped. -- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22 signature.asc Description: OpenPGP digital signature ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________ asio-users mailing list asio-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/asio-users

Next Message by Date: click to view message preview

Re: async_accept() and io_service::poll() problem

Christopher Kohlhoff wrote: > On Fri, 26 Oct 2007 12:42:19 -0700, "Michael Babcock" > <mbabcock-l0+D/198IYTByWg8CKQBQX5IBmhzj1fP0E9HWUfgJXw@xxxxxxxxxxxxxxxx> said: >> Has anybody tried using the io_service::poll() function in a tcp server? >> >> I'm writing a simple tcp server using async_accept and >> async_read_some(), which works fine when I use io_service::run(). >> Because I need to integrate this server into a thread that cannot block, >> I'm trying to use poll(). However my accept handler is never called, no >> matter how many times I connect to the port, and how much I call >> io_service::poll(). >> >> Tracing the code, it seems that it hits the if statement on line 218 of >> task_io_service.hpp and simply returns because handler_queue_ is empty, >> never actually calling select() to see if there is a new connection. >> >> I've tried asio versions 0.3.8rc3 and 0.3.8 final. I'm running Linux and >> have tried both the default epoll_reactor and the select_reactor. Same >> result. >> >> Any help would be appreciated. > > Please try the following fix: > > http://asio.cvs.sourceforge.net/asio/asio/include/asio/detail/task_io_service.hpp?r1=1.23&r2=1.24 > > Cheers, > Chris Thanks Chris, that fixed it. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

Previous Message by Thread: click to view message preview

Support for (named) pipes

Hello, I have seen a few comments in this list about plans for implementing support for asynchronous io on pipes. Has anything come of this? I am particularly interested in a Win32 iocp implementation. The problem I am working on has as its starting point an old-fashioned (Fortran) numerical simulation engine that talks to a GUI process over a couple of (anonymous) pipes. The idea is to put a service in the middle that can talk to multiple GUI clients (via sockets) and launch multiple engines on behalf of clients, connecting to the engines via pipes and mediating the flow of data between engines and clients. It would be nice to have a single-threaded service that simply demuxes the client and engine messages and does some buffering and flow control. Since Win32 doesn't support overlapped io on anonymous pipes, we could switch to named pipes. Roger The information contained in this e-mail is likely to be confidential and may be legally privileged. It is intended only for the addressee. If you have received this message in error please notify the sender immediately at the above address. The disclosure, copying or distribution of this message or its contents without the prior approval of Wallingford Software is strictly prohibited. Wallingford Software is not liable for unauthorised disclosures nor for subsequent actions or omissions in reliance upon them. Registered in the UK, company no: 02288719 Wallingford Software Limited, Howbery Park, Wallingford, Oxfordshire, OX10 8BA ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________ asio-users mailing list asio-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/asio-users

Next Message by Thread: click to view message preview

Re: iostream for ssl?

Michael Dickey wrote: > Are there any options in asio for making an SSL connection behave > like an iostream, similar to how ip::tcp::iostream works for non-SSL > connections? It looks like the only option is to use a ssl::stream > object, which is far more difficult to use for a simple, blocking > application (IMHO). You use the boost.iostreams library to wrap an ssl stream. I do have some ideas for some restructuring of the ssl support to make it a little easier to use, but that's not going to happen for a while. You could try something along similar lines to what I'm thinking -- derive your own stream_socket_service: class my_ssl_stream_service : public asio::stream_socket_service<tcp> { private: // Adapter to allow implementation_type to be used with ssl::stream. class stream_adapter { public: stream_adapter(implementation_type& impl); // Stream operations: // read_some() // write_some() // async_read_some() // async_write_some() }; public: // Override service's stream operations forward them to // ssl::stream<stream_adapter> // read_some() // write_some() // async_read_some() // async_write_some() }; And then you can use your new service class directly with the basic_socket_iostream template: typedef asio::basic_socket_iostream< tcp, my_ssl_stream_service> ssl_iostream; ssl_iostream s("www.google.com", "https"); ... Cheers, Chris ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by