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...
Type: Posts; User: PetrolMan
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...
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...
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...
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...
\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
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...
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...
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,...
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];...
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...
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...
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...
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...
Thank you much.
Nevermind...