x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make a HTTP server?

I do know how to make HTTP request after learning from tutorials. I wonder how to write a http server that any classes can make use of it. For example, in my class A, I need to get a jsonobject, I want the member function of the class "Http server" to return the json object. But how? The most confusing point is about Request->OnProcessRequestComplete().BindRaw(this, &HttpServer::OnResponseReceived); In OnResponseRecieved()I'm sure that the http request is completed, but in other function I know nothing. I can return nothing in OnResponseRecieved(). Maybe I can use TFunction to make my own callback fucntion in Class A, but it's too complicated for me. Please give me some information, Thank you.

Product Version: UE 4.18
Tags:
more ▼

asked Mar 27 '18 at 07:01 AM in C++ Programming

avatar image

langlangking
1 3 5

avatar image toni.alatalo Mar 27 '18 at 09:10 AM

The question title is confusing because 'HTTP server' usually means a, well, http server .. one that replies to requests. Whereas you want a http request maker, so client use and not server. You could call it a http request manager or something instead.

avatar image langlangking Apr 13 '18 at 03:16 AM

Thank you, I know little about networking.

avatar image egoldv Apr 20 '18 at 09:18 PM

You could look into several libraries: 1. Overview | POCO C++ Libraries 2. Boost.Asio - 1.55.0

Take some information from this thread http://www.cplusplus.com/forum/unices/127682/ or from AnswerShark site, where you can find many homework answers. Of course, it's important to determine for what functions the server will be used.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Sorry for my confusing title. If someone has same problem, well now I am using Unreal Delegates.

more ▼

answered Apr 13 '18 at 03:17 AM

avatar image

langlangking
1 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question