Search:

Type: Posts; User: PetrolMan

Search: Search took 0.01 seconds.

  1. Thread: Boost ASIO

    by PetrolMan
    Replies
    0
    Views
    3,070

    Boost ASIO

    I've been playing around with converting a winsock program over to the Boost ASIO library. The original program had a class that handled connecting to a server and the basic read/write functions. The...
  2. Replies
    8
    Views
    2,584

    I actually probably didn't give you all enough...

    I actually probably didn't give you all enough information. One thing I need to be able to do is to cycle through the data so in case someone wants to reuse the same input they can. This shouldn't...
  3. Replies
    8
    Views
    2,584

    Containers: List vs Vector

    Say I want to implement a buffer that stores the last fifty lines of input should I use a list or a vector? The list seems as though it would have less overhead but I was wondering if there was some...
  4. Replies
    2
    Views
    2,119

    Non Blocking I/O

    I know I can use threads to perform operations like:


    getline(cin, str)

    but I was wondering if there was another way. It just seems like there should be someway to check if the input buffer...
  5. Replies
    4
    Views
    1,735

    \0 is a Null Character Right? Is there a way...

    \0 is a Null Character Right?

    Is there a way to prevent the \0 from being put in or is that even desirable in the first place?

    PetrolMan
  6. Replies
    4
    Views
    1,735

    Quick Sizeof Question

    At the top of my program I created a definition:


    #define CRLF "\r\n"

    Which seems to work just fine except for the fact that the sizeof(CRLF) returns 3 when I would expect the result to be a...
  7. Replies
    10
    Views
    17,204

    *Slaps Forehead*

    I made the dumb mistake of not reading the MSDN reference very carefully.



    So once select() returns a negative on a socket's readability it is removed from the list. And that is the source of...
  8. Replies
    10
    Views
    17,204

    Progress: I've run the program with error...

    Progress: I've run the program with error checking and the first iteration goes just fine. On the second go around the select function seems to be the function that is failing. Interestingly enough,...
  9. Replies
    10
    Views
    17,204

    while (select(0, &sockets, 0, 0, &timeout)) {...

    while (select(0, &sockets, 0, 0, &timeout))
    {
    test = recv(mysock, bufs, sizeof(bufs), 0);
    if (test == 0)
    {
    cout << "Connection Closed\n";
    return 1;
    }
    cout << bufs[0];...
  10. Replies
    10
    Views
    17,204

    I appreciate the code. As for the firewall issue,...

    I appreciate the code. As for the firewall issue, how do you recognize this issue and create a workaround? For some protocols such as POP3 blocking sockets isn't much of an issue since there is a...
  11. Replies
    10
    Views
    17,204

    Winsock Select() Function

    I'm trying to make a real basic program that will connect to something read data until there is no more to read, then allow for input, then loop. I can create the socket, connect and read the first...
  12. Replies
    1
    Views
    1,481

    Question about Gprof

    I just got through playing around with Gprof and my results seem to be nonsensical. The program, a directory lister, ran for about ten seconds and then exited normally. The gmon.out file appeared and...
  13. Replies
    2
    Views
    1,100

    Using a String in the Place of a Char *

    I'm playing around with a function that requires a char * as input. The function reads some information and dumps it into the char *. I was wondering if there is a way to use a string in the place of...
  14. Replies
    3
    Views
    1,217

    Thank you much.

    Thank you much.
  15. Replies
    1
    Views
    871

    Nevermind...

    Nevermind...
Results 1 to 15 of 15