Thread: My First Network Console application

  1. #1
    C++ Newbie
    Join Date
    Jul 2005
    Location
    Plovdiv, Bulgaria
    Posts
    11

    My First Network Console application

    Ok, I'm a newbie and I'm trying to learn C++. I use Microsoft Visual C++. So I'm trying to make a console chat program. I already have the server and the client so that the server accepts the client connection and the client can write strings that are send to the server and the server can send the same string back(tought I'd be usefull for future development) and now I'm trying to figure out how to make my server accept more than one connection. I would be thankfull if anyone can give me a link to a place where I can read about this.
    Thanks in advance.

    P.S.: Sorry if it doesn't make any sence at all.

  2. #2
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    www.ecst.csuchico.edu/~beej/guide/net/bgnet.pdf
    read on the select() function... this will allow you to do what you want
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  3. #3
    C++ Newbie
    Join Date
    Jul 2005
    Location
    Plovdiv, Bulgaria
    Posts
    11
    I seem to be missing some files in my compiler but I'll see to get them and thanks for the link, I'm sure it'll help me out.

  4. #4
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    if you are talking about the weird headers then you are not missing anything... this guide was written for linux, so the headers are different, but the functions are the same! all you really need is the winsock.h winsock2.h and the right libs.

    read the "windows" section in the guide, at the beginning.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Running a console application
    By maxorator in forum C++ Programming
    Replies: 4
    Last Post: 10-03-2005, 04:23 AM
  2. icon in win32 console application
    By osal in forum Windows Programming
    Replies: 3
    Last Post: 06-30-2004, 02:13 PM
  3. Console Application
    By Mont_Blanc in forum C++ Programming
    Replies: 3
    Last Post: 04-17-2004, 03:07 AM
  4. GUI Application --> Console
    By Student040314 in forum C++ Programming
    Replies: 2
    Last Post: 03-14-2004, 01:30 PM
  5. Move cursor in console application
    By alfa in forum C# Programming
    Replies: 2
    Last Post: 02-09-2003, 02:58 PM