Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. boost ::asio:async_read_until usage/question from a newbie boost user

boost ::asio:async_read_until usage/question from a newbie boost user

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alan Kurlansky
    wrote on last edited by
    #1

    Hi, Just started using the boost libraries to do asynch i/o and not sure if this is the best forum for this but will post anyway. First question I am specifying a delimiter character in the call but when I display what I get back it looks like it is also implicitly returning when a LF \'n' char is reached even though this isn't my delimiter. Could this method have default delimiters that need to be managed? I haven't seen this in the documentation so far. Secondly, the second argument in the call is a "boost::asio::streambuf b". What's the best way to extract the message from the buffer and put it into an std::string? I've played around with: size_t n = b.size(); b.commit(n); std::istream is(&b); std::string s; is >> s; But now sure what's going on under the covers here. Any help would be appreciated. Thanks ak

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups