WEll acraig that didn''t work. I entered:
char *username_buf= new char[25];
char *password_buf= new char[25];
and when i run the app it hangs at the beginning. Any ideas on what i did wrong?
p.s. i just changed char *username_buf=NULL to that same with the password one!
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
someone please tell me what this means?
quote: Original post by kalldrex
and when i run the app it hangs at the beginning. Any ideas on what i did wrong?
Are you sure that it''s hanging or is it just waiting to receivce data? Are you sending stuff to this sockect?
Quote from the webpage:
"If no incoming data is available at the socket, the recv() call waits for data to arrive unless the socket is non-blocking."
-------
Andrew
No i''m not trying to send data but look at my code and you will see it should say "testing" before it starts recieving data!
Yeap. When I compile and run your code it works fine on my machine. Your best bet is to break out the debugger and try and see where it is stopping.
-------
Andrew
-------
Andrew
you should do either
// pointer a string, similar to i.e. PChar or LPSTR
char * namebuf = new * char;
or
// array of 25 chars
char namebuf[25];
but the one you used is not such a good idea since, I think, it could cause improper stack handling (that''d be the reason why it locks up right at the beginning)
well if I''m totally wrong here plz tell me
HTH
pi~
// pointer a string, similar to i.e. PChar or LPSTR
char * namebuf = new * char;
or
// array of 25 chars
char namebuf[25];
but the one you used is not such a good idea since, I think, it could cause improper stack handling (that''d be the reason why it locks up right at the beginning)
well if I''m totally wrong here plz tell me
HTH
pi~
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement