Hello All,
Is it possible to make some form of HTTP request in C++? Also, is there a way to control ports in C++?
I heard stuff about it and wondered if it was possible in C++.
Thanks.
11 replies to this topic
#1
Posted 15 May 2010 - 06:28 PM
|
|
|
#2
Posted 15 May 2010 - 07:48 PM
You need to make a network connection, and send/receive appropriate HTTP compliant messages over it. Most web browsers are coded in C or C++.
#3
Posted 16 May 2010 - 03:39 AM
These things are platform dependent and you will have to use the corresponding API of the OS you are using.
Windows provide Wininet which makes it easier to do http://msdn.microsof...3%28VS.85).aspx
Also sockets socket Function (Windows)
Linux is great for networking Linux Howtos: C/C++ -> Sockets Tutorial
Warrior
Windows provide Wininet which makes it easier to do http://msdn.microsof...3%28VS.85).aspx
Also sockets socket Function (Windows)
Linux is great for networking Linux Howtos: C/C++ -> Sockets Tutorial
Warrior
#4
Posted 16 May 2010 - 05:07 AM
What would the ability to control ports do? :o
sounds interesting, but I have no clue what the benefit is
sounds interesting, but I have no clue what the benefit is
#5
Posted 16 May 2010 - 05:53 AM
There is also a boost library that can help you make cross-platform code. Of course, it will use the underlying platform to make the connection. Boost.Asio
#6
Posted 16 May 2010 - 10:15 PM
Well, sounds too complicated to be answered in a thread, so what concepts would I need to learn?
#7
Posted 17 May 2010 - 07:32 AM
Mostly, you just need to know the format of an HTTP request, which is pretty simple.
#8
Posted 17 May 2010 - 09:48 PM
Yeah that's simple, but how do I implement that into C++ code? What syntax? (After I had the library of course).
#9
Posted 18 May 2010 - 06:56 AM
You just open a connection on port 80 (I haven't used the asio library, so would need to look up the syntax myself), then just send a message that is compliant with the standard HTTP protocol.
#10
Posted 18 May 2010 - 10:57 PM
That's why I wanted to know how to open ports in C++.
#12
Posted 19 May 2010 - 01:22 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









