Archived

This topic is now archived and is closed to further replies.

Client - PLEASE HELP!

This topic is 5116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Everyone, I have a group assignment to do and I need to basically get a simple blackjack game working over a network. So basically we have to make a Client and a server. My job is to make the game and a Client. This has to be done for next Thursday and I have been dropped in the deep end and have NEVER programmed in C++ before! :-( I know that I am never going to get it fully working but to at least pass I need to at least get a little Client together that at least can pass messages over the network. So what I want to do is just at least get a little chat Client working or something. We have to be able to show we can create sockets. I know that some of the processes I should need to use are: Socket(), bind(), connect() and close(). The Socket type I am using is TCP. As you can probably guess I'm really stressing about this now because I have no idea how to go about it. I'm sorry but I don't have any code to post up here. I'm not expecting anyone to do this for me but any help that anybody is willing to give me will be more than appreciated. Any code, examples or anything that might help me at least get a simple Client set up will be of great help. Or if somebody has the time to do a little more than that feel free. PLEASE HELP!!! Thank you for any help, Mark. P.S. If anybody does want to help but needs more information on what I have to do just ask. (The reason I have never used C++ before is because I took a year out at uni and then when I came back they had changed the programming we are using from Java to C++ so it's my supid Uni's fault that I can't do this!) [edited by - markpratt on December 13, 2003 12:31:47 AM]

Share this post


Link to post
Share on other sites
BTW, I''m not going to lie to you.... considering your level of expertise with C++, the timetable you have, and your goal....your chances are not good. Networking tends to do extremely tricky things to program control flow, things you haven''t seen before. I suggest that you set your sights as low as possible. Ideally, your client could just be a program that accepts and displays all text from the server until it gets a null character. Then it sends a line of text that the user types. Then it accepts and displays. Then it sends. This way, you can avoid nonblocking communication on the client side.

Good luck.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
I know that i''m going to get very far. What you just suggested is exactly what I want to do. But I just wanted some tips on how to get started or bits of code to help me on my way. The link you sent me looks useful. Anything like that will do but given my situation if anybody has more to offer me then it will be more than just helpful.
Thanx, Mark.

Share this post


Link to post
Share on other sites
try look at the winsock control, im sorta sure microsoft bunched up the winsock code and made 'easier' to use

oh and your screwed, why did you choose something so hard for your level

[edited by - johnnyBravo on December 14, 2003 11:06:00 AM]

Share this post


Link to post
Share on other sites