-
Feb 22nd, 2015, 11:02 AM
#1
[RESOLVED] How to setup an HttpListener in C++
In VB.Net code I have this:
Code:
Private m_listener As HttpListener = Nothing
.
.
.
Private Sub RequestRcvd(ByVal result As IAsyncResult)
Dim context As HttpListenerContext = m_listener.EndGetContext(result)
m_listener.BeginGetContext(New AsyncCallback(AddressOf RequestRcvd), Nothing)
this is running in a proof-of-concept app. This VB.Net app calls C++ functions that analyze strings and put results into arrays. These arrays are processed in the VB.Net app after the C++ unmanaged functions are called.
At any rate - I want all of this in C++ now.
So the first part is how to call these types of functions - which are in HTTP.SYS I believe.
Can I somehow look at the function source for these .Net library functions?
Last edited by szlamany; Feb 22nd, 2015 at 12:30 PM.
-
Mar 4th, 2015, 08:10 PM
#2
Re: How to setup an HttpListener in C++
Anyone here ever do http calls from c++???
-
Mar 5th, 2015, 03:02 AM
#3
Re: How to setup an HttpListener in C++
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
Mar 5th, 2015, 04:29 AM
#4
Re: How to setup an HttpListener in C++
Hey szlamany. I would recommend looking at libcurl (http://curl.haxx.se/libcurl/) for HTTP requests. HTTP is only one of the protocols it supports, it's a neat library.
-
Mar 5th, 2015, 08:40 AM
#5
Re: How to setup an HttpListener in C++
Thanks for all those links.
Atheist - have you used libcurl in any fashion?
-
Mar 5th, 2015, 08:55 AM
#6
Re: How to setup an HttpListener in C++
Yeah I have! It's the library for HTTP communication in C and C++
-
Mar 5th, 2015, 09:35 AM
#7
Re: How to setup an HttpListener in C++
Excellent - that is the whole reason I posted!!
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|