Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Simple chat programs

Simple chat programs

Scheduled Pinned Locked Moved Managed C++/CLI
sysadmindata-structurestutoriallounge
10 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Melnx
    wrote on last edited by
    #1

    I searched through many of the "chat" programs provided on this site, but could not find any that were simple enough, and a lot even used a windows interface. What I want to know how to do, is to make a simple server and a client using a terminal window. All I basically want it to do is this: SERVER:: >Runs on a hardcoded ip adress and port (for simplicity) and can handle multiple clients. >Also, needs to somehow keep track of the IP+ports of the users who are logged on. (maybe a string array would work well) CLIENT:: >Whenever you run the Client, it connects to the hardcoded IP+port. >As soon as you logon, the server sends you some simple message like "Hello" >Then, you put in the nickname you want to use. >Then you enter the chat room, and whatever you type in, the server sends to all the other Clients. like this "MyName> hello chat clients" Also, if you could, please keep this to as few includes as possible, as far as I can tell, you really only need or and "winsock2.h". Also, please keep it to standard datatypes (int char string etc.) Thank you for helping me with this project.

    C A G 3 Replies Last reply
    0
    • M Melnx

      I searched through many of the "chat" programs provided on this site, but could not find any that were simple enough, and a lot even used a windows interface. What I want to know how to do, is to make a simple server and a client using a terminal window. All I basically want it to do is this: SERVER:: >Runs on a hardcoded ip adress and port (for simplicity) and can handle multiple clients. >Also, needs to somehow keep track of the IP+ports of the users who are logged on. (maybe a string array would work well) CLIENT:: >Whenever you run the Client, it connects to the hardcoded IP+port. >As soon as you logon, the server sends you some simple message like "Hello" >Then, you put in the nickname you want to use. >Then you enter the chat room, and whatever you type in, the server sends to all the other Clients. like this "MyName> hello chat clients" Also, if you could, please keep this to as few includes as possible, as far as I can tell, you really only need or and "winsock2.h". Also, please keep it to standard datatypes (int char string etc.) Thank you for helping me with this project.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      So basically you don't want anything too fancy, or your teacher will know you didn't do your homework ? Nice try. Given that you've asked in the wrong forum ( or are you learning Managed C++ ? ), I guess you're not the most attentive guy, which probably accounts for your not being able to do your own homework. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      1 Reply Last reply
      0
      • M Melnx

        I searched through many of the "chat" programs provided on this site, but could not find any that were simple enough, and a lot even used a windows interface. What I want to know how to do, is to make a simple server and a client using a terminal window. All I basically want it to do is this: SERVER:: >Runs on a hardcoded ip adress and port (for simplicity) and can handle multiple clients. >Also, needs to somehow keep track of the IP+ports of the users who are logged on. (maybe a string array would work well) CLIENT:: >Whenever you run the Client, it connects to the hardcoded IP+port. >As soon as you logon, the server sends you some simple message like "Hello" >Then, you put in the nickname you want to use. >Then you enter the chat room, and whatever you type in, the server sends to all the other Clients. like this "MyName> hello chat clients" Also, if you could, please keep this to as few includes as possible, as far as I can tell, you really only need or and "winsock2.h". Also, please keep it to standard datatypes (int char string etc.) Thank you for helping me with this project.

        A Offline
        A Offline
        Aaron Sulwer
        wrote on last edited by
        #3

        check out "Network Development Kit 2" which can be found on this site.

        M 2 Replies Last reply
        0
        • A Aaron Sulwer

          check out "Network Development Kit 2" which can be found on this site.

          M Offline
          M Offline
          Melnx
          wrote on last edited by
          #4

          Wow Christian...why would I even be in a class where I would program a server. Anyway, this is just for my own use, and the simplicity is just for easier understanding.

          1 Reply Last reply
          0
          • A Aaron Sulwer

            check out "Network Development Kit 2" which can be found on this site.

            M Offline
            M Offline
            Melnx
            wrote on last edited by
            #5

            Hey Aaron, can I please have the link to the Network Development Kit 2.

            A 1 Reply Last reply
            0
            • M Melnx

              Hey Aaron, can I please have the link to the Network Development Kit 2.

              A Offline
              A Offline
              Aaron Sulwer
              wrote on last edited by
              #6

              if you do a search of this site you will find it, but to make things easier for you i will include the link for you. http://www.codeproject.com/internet/ndk.asp

              M 2 Replies Last reply
              0
              • A Aaron Sulwer

                if you do a search of this site you will find it, but to make things easier for you i will include the link for you. http://www.codeproject.com/internet/ndk.asp

                M Offline
                M Offline
                Melnx
                wrote on last edited by
                #7

                Yes, thats definitly a windows application. http://www.codeproject.com/internet/NDK/NDKClient.jpg[^]

                1 Reply Last reply
                0
                • A Aaron Sulwer

                  if you do a search of this site you will find it, but to make things easier for you i will include the link for you. http://www.codeproject.com/internet/ndk.asp

                  M Offline
                  M Offline
                  Melnx
                  wrote on last edited by
                  #8

                  A funny thing is that a wizard created that app. Doesnt anyone do it manually anymore? Another problem, is that the only thing that could probably compile it is VC++, which is pretty lame.

                  A 1 Reply Last reply
                  0
                  • M Melnx

                    A funny thing is that a wizard created that app. Doesnt anyone do it manually anymore? Another problem, is that the only thing that could probably compile it is VC++, which is pretty lame.

                    A Offline
                    A Offline
                    Aaron Sulwer
                    wrote on last edited by
                    #9

                    sure a wizard created the app but not the underlying code. Check the source code for the app and you will see that the sdk is not wizard created.

                    1 Reply Last reply
                    0
                    • M Melnx

                      I searched through many of the "chat" programs provided on this site, but could not find any that were simple enough, and a lot even used a windows interface. What I want to know how to do, is to make a simple server and a client using a terminal window. All I basically want it to do is this: SERVER:: >Runs on a hardcoded ip adress and port (for simplicity) and can handle multiple clients. >Also, needs to somehow keep track of the IP+ports of the users who are logged on. (maybe a string array would work well) CLIENT:: >Whenever you run the Client, it connects to the hardcoded IP+port. >As soon as you logon, the server sends you some simple message like "Hello" >Then, you put in the nickname you want to use. >Then you enter the chat room, and whatever you type in, the server sends to all the other Clients. like this "MyName> hello chat clients" Also, if you could, please keep this to as few includes as possible, as far as I can tell, you really only need or and "winsock2.h". Also, please keep it to standard datatypes (int char string etc.) Thank you for helping me with this project.

                      G Offline
                      G Offline
                      GHHTavasoli
                      wrote on last edited by
                      #10

                      :laugh:;P;):cool:

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups