It still waits... What'd I do wrong?
fd_set readfds;
struct timeval count;
FD_ZERO(&readfds);
FD_SET(sockfd, &readfds);
select(0, &readfds, 0, 0, &count);
if (FD_ISSET(sockfd, &readfds))
Type: Posts; User: eam
It still waits... What'd I do wrong?
fd_set readfds;
struct timeval count;
FD_ZERO(&readfds);
FD_SET(sockfd, &readfds);
select(0, &readfds, 0, 0, &count);
if (FD_ISSET(sockfd, &readfds))
Aww Beej's example is the example I found to be "undecent." One is too simplified (stdin! how do I do this with sockets?) and the other is too complex...
Thanks anyway.
Do you know where I could find a decent select() example?
recv() just waits until the server sends something. Is there any way to use recv() (or a similar function) to get text if its sent but continue on if its not?
Awesome, it works. I've been trying to fix this code for hours... the tutorial had other errors too :/. Thanks.
I'm trying to compile the chapter two example from http://users.skynet.be/saw/wxtutorial/wxTutorial.html on Linux...
eric@DataStream:~/code/texteditor$ g++ textframe.cpp texteditorapp.cpp...
Sound recorder works. Thanks!
Note - incase anyone else is looking for this, in sound recorder you need to insert the files in reverse order of how they will be played...
Is there a free way to combine about 10 wav files into one big file? They must stay in the same order.
But look what MenuetOS does.... http://www.menuetos.org/displays%5C070c.png. That's awesome, but I'm not talking about anything near that. Just a simple command line with a couple of utilities.
I...
Hello,
Me and my friend are very interested in making an operating sytem on a floppy disk. We are looking for someone experianced to help us since we really don't know what to do. I was able to...
Guess I have some reading to do then, thanks for pointing me in the right direction.
How would I do that?
I want to make a console program able to output text and do other things while a user is typing input. I'm going to use ncurses for the display. How could I do two things at the same time?
No, I'm replying to the server's PING with a PONG. I used putty and entered all the exact stuff my code does and I connected. It has to be a problem in code...
And you don't need to teach me how...
I just asked if someone knew where I could get a sample IRC bot. I didn't beg for one to be made for me. If no one knows about one, fine. And I said I tried google.
But I'm made some progress. It...
I said no tutorials :(
I want some code, if you don't have any don't post.
That's the part I'm having trouble with. I could get the bot to start connecting but I can't seem to send anything to the server no matter what I try. I've read two tutorials so don't just paste a...
Does anyone have an IRC bot written in C++ that I could look at? I'm trying to make one but I'm not getting anywhere with it.
Thanks.
It's working perfectly now. Thanks to everyone who help.
Okay, here's what I have:
///works
GetModuleFileName(NULL,file,MAX_PATH);
char *p = strrchr(file, '\\');
p[1] = NULL;
int t;
There's one problem, the program name is added to the end of the path. I need to use that as a starting place for directories around the program. How should I remove the name out of it? Or is there a...
How'd I mess this up? No errors but it crashes my program... I tried I couple ways but this is the one that compiles:
LPTSTR file;
DWORD num = 100;
GetModuleFileName(NULL,file,num);
How do I find the current path of my program? I need to access a directory called \data and ".\\data\\file" does do it.
I don't have a router. How do I check if I have a wlan card? And what do I hook it up with?
Waldo2k2: Will do next time, but that thread only answers half of my question.
Maybe I made it sound...
I want to connect my three computers so they can share an internetconnection and access each other's files. One computer is XP, one is Win98, and the last is RH 8. I don't have any idea how to...