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. C / C++ / MFC
  4. Basic Server/Client TCP/IP Software Examples

Basic Server/Client TCP/IP Software Examples

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++csssysadmin
9 Posts 5 Posters 0 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.
  • B Offline
    B Offline
    Bram van Kampen
    wrote on last edited by
    #1

    Hi, I am looking for a Basic C or CPP TCP/IP Server Client sample to build around. All I can find is CSS or C# samples. My compiler was born in 1997, but is also my good and trusted friend. Something that it can digest would be appreciated. Kind Regards, :)

    Bram van Kampen

    L K L 3 Replies Last reply
    0
    • B Bram van Kampen

      Hi, I am looking for a Basic C or CPP TCP/IP Server Client sample to build around. All I can find is CSS or C# samples. My compiler was born in 1997, but is also my good and trusted friend. Something that it can digest would be appreciated. Kind Regards, :)

      Bram van Kampen

      L Offline
      L Offline
      leon de boer
      wrote on last edited by
      #2

      You haven't told us what O/S it's for assuming windows the standard winsock sample is on MSDN Running the Winsock Client and Server Code Sample - Windows applications | Microsoft Docs[^] You can also download brand new free C compilers there all it costs is an email registration :-) Free Developer Software & Services - Visual Studio[^]

      In vino veritas

      B 1 Reply Last reply
      0
      • B Bram van Kampen

        Hi, I am looking for a Basic C or CPP TCP/IP Server Client sample to build around. All I can find is CSS or C# samples. My compiler was born in 1997, but is also my good and trusted friend. Something that it can digest would be appreciated. Kind Regards, :)

        Bram van Kampen

        K Offline
        K Offline
        k5054
        wrote on last edited by
        #3

        There's bunches of stuff out there as a google search for C++ TCP server will show - however if you're using a '97 vintage compiler, then what OS are you using? Anything for Win10 (or even XP) may not be appropriate. If you're looking for DOS, OS/2, or something unixy, then adding those search terms should provide you with something useful.

        1 Reply Last reply
        0
        • L leon de boer

          You haven't told us what O/S it's for assuming windows the standard winsock sample is on MSDN Running the Winsock Client and Server Code Sample - Windows applications | Microsoft Docs[^] You can also download brand new free C compilers there all it costs is an email registration :-) Free Developer Software & Services - Visual Studio[^]

          In vino veritas

          B Offline
          B Offline
          Bram van Kampen
          wrote on last edited by
          #4

          Well Leon, About the Machines it will Run On. The Server software will run under WinXP SP2, The Client Software will run on Win7 or above. The software is intended to provide a bridge between the Database running on XP, and an Internet Server, connected to a local data server via an ADSL connection to serve the database. We expect minimal traffic, no pics or films, just text files to tell our clients that their laundry is ready, and, what the bill is. I am also very concerned about the lack of gravity given in the education system to languages like C and CPP. Many young programmers I speak to consider C and CPP a sort of old fashioned ancient languages, long superseded by Java, JS, JCODE, Perl, C# and CS! Very few of these realize that All these interpreters are ultimately written in 'C' or 'ASM'. I Despair at this! What percentage of "Software Engineers" understand Assembly Code, never mind Machine Code! The understanding of the Nuts and Bolts of any system, will always remain important! Kind Regards and Thanks, :)

          Bram van Kampen

          J 1 Reply Last reply
          0
          • B Bram van Kampen

            Well Leon, About the Machines it will Run On. The Server software will run under WinXP SP2, The Client Software will run on Win7 or above. The software is intended to provide a bridge between the Database running on XP, and an Internet Server, connected to a local data server via an ADSL connection to serve the database. We expect minimal traffic, no pics or films, just text files to tell our clients that their laundry is ready, and, what the bill is. I am also very concerned about the lack of gravity given in the education system to languages like C and CPP. Many young programmers I speak to consider C and CPP a sort of old fashioned ancient languages, long superseded by Java, JS, JCODE, Perl, C# and CS! Very few of these realize that All these interpreters are ultimately written in 'C' or 'ASM'. I Despair at this! What percentage of "Software Engineers" understand Assembly Code, never mind Machine Code! The understanding of the Nuts and Bolts of any system, will always remain important! Kind Regards and Thanks, :)

            Bram van Kampen

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #5

            Bram van Kampen wrote:

            The Server software will run under WinXP SP2

            For a business that doesn't sound like a good idea. Even normal databases designed for XP had IP ports so a server could run on a different more modern computer and just communicate with the legacy system. Both could run behind normal security setups.

            Bram van Kampen wrote:

            Many young programmers I speak to consider C and CPP a sort of old fashioned ancient languages, long superseded by Java, JS, JCODE, Perl, C# and CS!

            Perl? I haven't seen anyone actively using Perl except me basically ever. In the 90s I worked in a shop that was exclusively Unix programmers and far as I could tell of the 300 developers I was the only one that knew how to use it. And since then even knowing that exists has gone down. And I have no idea what "CS" would be given that you already referred to C#. My guess is that embedded programming uses a lot of C. That is the only reason I can see for the popularity in the tiobe index at number 2 for C.

            Bram van Kampen wrote:

            Very few of these realize that All these interpreters are ultimately written in 'C' or 'ASM'.

            Nope. The Java VM is written in Java excluding a very small subset of C++. The Java compiler is written completely in Java - it in fact runs in the Java VM. And that second statement has been true for a very long time probably at least early 2000s. Eclipse and Intellij are both written in java. The very earliest Java compiler might have had ASM in it but at least in about the late 90s it did not (I used to look at the source code quite a bit.) The current C# compiler is written in C#. I believe it was C++ before that. Visual Studio appears to be written, best as I can tell, mostly in javascript. GCC has been C++ since 2012. Before that it was C. There might be some very small niche processors that use an assembler compiler written in assembler. But even back at least in the 80s assemblers were written in languages besides assembler.

            B 2 Replies Last reply
            0
            • J jschell

              Bram van Kampen wrote:

              The Server software will run under WinXP SP2

              For a business that doesn't sound like a good idea. Even normal databases designed for XP had IP ports so a server could run on a different more modern computer and just communicate with the legacy system. Both could run behind normal security setups.

              Bram van Kampen wrote:

              Many young programmers I speak to consider C and CPP a sort of old fashioned ancient languages, long superseded by Java, JS, JCODE, Perl, C# and CS!

              Perl? I haven't seen anyone actively using Perl except me basically ever. In the 90s I worked in a shop that was exclusively Unix programmers and far as I could tell of the 300 developers I was the only one that knew how to use it. And since then even knowing that exists has gone down. And I have no idea what "CS" would be given that you already referred to C#. My guess is that embedded programming uses a lot of C. That is the only reason I can see for the popularity in the tiobe index at number 2 for C.

              Bram van Kampen wrote:

              Very few of these realize that All these interpreters are ultimately written in 'C' or 'ASM'.

              Nope. The Java VM is written in Java excluding a very small subset of C++. The Java compiler is written completely in Java - it in fact runs in the Java VM. And that second statement has been true for a very long time probably at least early 2000s. Eclipse and Intellij are both written in java. The very earliest Java compiler might have had ASM in it but at least in about the late 90s it did not (I used to look at the source code quite a bit.) The current C# compiler is written in C#. I believe it was C++ before that. Visual Studio appears to be written, best as I can tell, mostly in javascript. GCC has been C++ since 2012. Before that it was C. There might be some very small niche processors that use an assembler compiler written in assembler. But even back at least in the 80s assemblers were written in languages besides assembler.

              B Offline
              B Offline
              Bram van Kampen
              wrote on last edited by
              #6

              Members of the Jury, I Rest my Case!

              Bram van Kampen

              1 Reply Last reply
              0
              • B Bram van Kampen

                Hi, I am looking for a Basic C or CPP TCP/IP Server Client sample to build around. All I can find is CSS or C# samples. My compiler was born in 1997, but is also my good and trusted friend. Something that it can digest would be appreciated. Kind Regards, :)

                Bram van Kampen

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Lots of samples: sockets c - Google Search[^]. The basics of sockets have not changed for years so you can work from any of the more modern samples in an old compiler: my first sockets program was developed using Visual C++ 6.0 (so long ago).

                1 Reply Last reply
                0
                • J jschell

                  Bram van Kampen wrote:

                  The Server software will run under WinXP SP2

                  For a business that doesn't sound like a good idea. Even normal databases designed for XP had IP ports so a server could run on a different more modern computer and just communicate with the legacy system. Both could run behind normal security setups.

                  Bram van Kampen wrote:

                  Many young programmers I speak to consider C and CPP a sort of old fashioned ancient languages, long superseded by Java, JS, JCODE, Perl, C# and CS!

                  Perl? I haven't seen anyone actively using Perl except me basically ever. In the 90s I worked in a shop that was exclusively Unix programmers and far as I could tell of the 300 developers I was the only one that knew how to use it. And since then even knowing that exists has gone down. And I have no idea what "CS" would be given that you already referred to C#. My guess is that embedded programming uses a lot of C. That is the only reason I can see for the popularity in the tiobe index at number 2 for C.

                  Bram van Kampen wrote:

                  Very few of these realize that All these interpreters are ultimately written in 'C' or 'ASM'.

                  Nope. The Java VM is written in Java excluding a very small subset of C++. The Java compiler is written completely in Java - it in fact runs in the Java VM. And that second statement has been true for a very long time probably at least early 2000s. Eclipse and Intellij are both written in java. The very earliest Java compiler might have had ASM in it but at least in about the late 90s it did not (I used to look at the source code quite a bit.) The current C# compiler is written in C#. I believe it was C++ before that. Visual Studio appears to be written, best as I can tell, mostly in javascript. GCC has been C++ since 2012. Before that it was C. There might be some very small niche processors that use an assembler compiler written in assembler. But even back at least in the 80s assemblers were written in languages besides assembler.

                  B Offline
                  B Offline
                  Bram van Kampen
                  wrote on last edited by
                  #8

                  Well, The My Program Suite is out in the field since 2005. It runs on XP. It works well, We provide the terminals. built out of recycled computers. Our customers do not view these terminals as computers, but as Tills. The code is under licence, so I get an annual pay for each license, and everyone is happy. I am in a niche market, without any local competition. The working code base will never be migrated to another Software platform. Also, because of the persistence of never changing the basic user interface for staff, other than in minimal ways, we have reduced staff training costs for our clients to close to zero. All Bugs are long resolved, the program works as it states on the Can, so, why should I try to improve. The Database we use is totally proprietary, developed in our lab. Our Database is hence extremely resistant to Hacking, the format and organisation is private to the company! We do not use standard software because it is too easy to hack! Our protocols are always non standard, by slightly deviating from the standard, in un expected ways. Using C#, what you write gets translated to 'Universal Intermediate Code' to run on the Just in Time c# virtual machine. That intermediate code can easily be decompiled to the original source code, with the loss of function and naming conventions We as an organisation will never entertain it as a way to distribute our code!

                  Bram van Kampen

                  J 1 Reply Last reply
                  0
                  • B Bram van Kampen

                    Well, The My Program Suite is out in the field since 2005. It runs on XP. It works well, We provide the terminals. built out of recycled computers. Our customers do not view these terminals as computers, but as Tills. The code is under licence, so I get an annual pay for each license, and everyone is happy. I am in a niche market, without any local competition. The working code base will never be migrated to another Software platform. Also, because of the persistence of never changing the basic user interface for staff, other than in minimal ways, we have reduced staff training costs for our clients to close to zero. All Bugs are long resolved, the program works as it states on the Can, so, why should I try to improve. The Database we use is totally proprietary, developed in our lab. Our Database is hence extremely resistant to Hacking, the format and organisation is private to the company! We do not use standard software because it is too easy to hack! Our protocols are always non standard, by slightly deviating from the standard, in un expected ways. Using C#, what you write gets translated to 'Universal Intermediate Code' to run on the Just in Time c# virtual machine. That intermediate code can easily be decompiled to the original source code, with the loss of function and naming conventions We as an organisation will never entertain it as a way to distribute our code!

                    Bram van Kampen

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    Bram van Kampen wrote:

                    The My Program Suite is out in the field since 2005...

                    That doesn't have anything to do with your statement about modern programming languages.

                    Bram van Kampen wrote:

                    We do not use standard software because it is too easy to hack!

                    90% of data loss from companies is due to internal breaches. An employee walks off with the data. Most of the rest is based on employees doing something wrong - like posting their login on a postit on the box. Actual technical "hacking" from outside sources is rare (compared to all business losses).

                    Bram van Kampen wrote:

                    Using C#, what you write gets translated to 'Universal Intermediate Code' to run on the Just in Time c# virtual machine. That intermediate code can easily be decompiled to the original source code, with the loss of function and naming conventions We as an organisation will never entertain it as a way to distribute our code!

                    First I know exactly how C# works. I also know how java, perl, C++, C, assembler and even SQL on various boxes works. I have in fact written several custom compilers and interpreters and have written an IDE as well. Secondly I can see how you feel that that protects your IP, but doesn't have much to do with the statement that I originally responded to.

                    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