What I’m trying to do is make a C++ program that will listen on a port, port 6000 to be exact, and capture all the requests from that port. I have a program called wireshark that shows all the “transactions” that take place throughout an Ethernet port or entire modem. This will help a little in learning how a specific program that I want to capture requests from sends out its requests. Firstly, what exactly would I be looking for when it comes to making a C++ program that will listen and then take in all the requests that come in through that port?
What I have now is a simple program that runs in an infinite “while” loop. In that loop it will go through an “if” statement that checks the port for requests. If it picks up a request then it will gather that data and process it and then “cout” the answer/data back to the requesting program. The way my program will work is sort of how secretaries in big companies do. You’re trying to get in contact will the boss, in this case the harddrive, and my program says, “I have detected your request. Let me take this information, give it to the boss and then give any information I receive back to you (the request on the port).”
I’m not looking for anyone to make a program for me; I won’t tell if you do
P.S. I already know that computers do this and that I can download a program to do it. But, what would be the point of learning a computer language if I can’t type my own?
Thanks,

New Topic/Question
Reply



MultiQuote








|