Search:

Type: Posts; User: azteched

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: http requests

    by azteched
    Replies
    3
    Views
    1,274

    Most of the above post is incorrect, I suggest...

    Most of the above post is incorrect, I suggest both posters read Section 4.4 of the HTTP 1.1 RFC.
  2. Replies
    7
    Views
    4,678

    Do you create your threads detached or not...

    Do you create your threads detached or not detached?
  3. Replies
    17
    Views
    3,850

    It actually tells you how many bytes were...

    It actually tells you how many bytes were available up to the time ioctlsocket returns - it doesn't make any guarantees about the availability of data later.
  4. Replies
    17
    Views
    3,850

    Yes, but each time you call recv, it's important...

    Yes, but each time you call recv, it's important to check the return value, as that will be the number of bytes actually written to your buffer.
  5. Some do say that (personally I think it's stupid...

    Some do say that (personally I think it's stupid to restrict yourself like that, it all depends on the situation), but in the presence of exceptions, there can't be one exit point. RAII/scoped...
  6. Yep. (N.b. I use the term mutex to refer to...

    Yep. (N.b. I use the term mutex to refer to CRIT_SECT because it's in line with pthreads terminology).



    You could pass a pointer to a struct containing all the data required for the thread,...
  7. Executing the same code is fine, it's modifying...

    Executing the same code is fine, it's modifying shared data that you need to protect. Th fact you thought otherwise leads me to believe you need to learn a bit more about threading and...
  8. Replies
    2
    Views
    889

    Or use boost (http://www.boost.org) ...

    Or use boost



    #include <boost/lexical_cast.hpp>

    double MyDouble = 1.602;
    std::string MyStr = boost::lexical_cast<string> (MyDouble);
  9. Replies
    5
    Views
    1,517

    To the first question: You don't need external...

    To the first question:

    You don't need external synchronization just to send() and recv() in multiple threads on the same socket, but you'll likely sync. some at some point.
  10. Replies
    5
    Views
    1,114

    VC2005 beta doesn't come with the platform SDK,...

    VC2005 beta doesn't come with the platform SDK, you need to download it separately, and then add the include directories in the platform SDK to VC2005 in Options.
  11. Sorry - WSAEventSelect...

    Sorry -

    WSAEventSelect
    GetQueuedCompletionStatus with CreateIOCompletionPort
    Standard blocking sockets in multiple threads is async too, because threads are async by definition.
  12. MSDN basically explains how to use them..

    MSDN basically explains how to use them..
  13. Only WSAAsyncSelect requires the windows program...

    Only WSAAsyncSelect requires the windows program stuff (i.e. a window procedure and message pump). Other async. methods don't.
  14. Replies
    17
    Views
    3,850

    Are you forwarding the relevant port(s) on your...

    Are you forwarding the relevant port(s) on your router?
  15. Replies
    8
    Views
    3,091

    You need to compile your code on some kind of...

    You need to compile your code on some kind of unix system - Windows/MS compiler don't do fork().
  16. Replies
    6
    Views
    915

    Templates can be considered as "compile time...

    Templates can be considered as "compile time polymorphism" - they let you write the same code against multiple types. I think it's also known as "parametric polymorphism" (?).
  17. Replies
    41
    Views
    10,009

    Make the socket non-blocking?

    Make the socket non-blocking?
  18. Replies
    41
    Views
    10,009

    When using non-blocking sockets, you'd monitor...

    When using non-blocking sockets, you'd monitor via select() or whatever, because there's no point in looping waiting for send() not to fail with EWOULDBLOCK.
  19. Replies
    2
    Views
    4,887

    Well that's why I posted; there isn't anything I...

    Well that's why I posted; there isn't anything I can see from the docs that does what I want. It's pretty trivial to implement, but I was suprised there's no "relative_to" function in the library.
  20. Replies
    2
    Views
    4,887

    boost::filesystem - relative paths

    I have some path (Folder) that I'm searching:



    for (directory_iterator It (Folder); It != EndIt; ++It) {

    Contents.push_back (*It);
    }
  21. Replies
    12
    Views
    5,328

    Yes, WSAAsyncSelect or other related functions...

    Yes, WSAAsyncSelect or other related functions are probably more appropriate for a Windows app.
  22. Replies
    7
    Views
    848

    std::vector isn't allowed to be implemented as a...

    std::vector isn't allowed to be implemented as a linked list - it's required to have contiguous memory.
  23. Replies
    11
    Views
    1,768

    Point him to the STL, Boost, and any other...

    Point him to the STL, Boost, and any other template library - they implement their classes in the headers. Putting the implementation in a cpp, then including the cpp is exactly the same thing, but...
  24. Replies
    11
    Views
    1,768

    Yeh but if you're going to #include cpp files,...

    Yeh but if you're going to #include cpp files, you may as well stick the whole lot in the header, and have just one file.
  25. Replies
    4
    Views
    1,801

    Put them inside the #define. I wouldn't...

    Put them inside the #define.
    I wouldn't necessarily use "using namespace std" (pulling in the entire std:: namespace) when "using std::vector" would suffice (as here).
Results 1 to 25 of 95
Page 1 of 4 1 2 3 4