[Libwebsockets] http server help
pmgupta.akl at gmail.com
Fri Jul 3 23:53:14 CEST 2020
Thanks Andy for quick response. Yes I want both server and client
side. Your server reference code helped me what I was looking for.
Basically I was confused on how to have different protocols but your
pointer helped for the url can be extracted. Thanks again, I will try
out my code now.
On Fri, Jul 3, 2020 at 12:00 PM <andy at warmcat.com> wrote:
> On July 3, 2020 6:51:12 PM UTC, Puja Gupta <pmgupta.akl at gmail.com> wrote:
> >I am newbie to web programming so pardon if my questions are stupid. I
> So far so good.
> >studied libwebsockets code and have some idea for setting up http
> >server/client. Now what I am looking to achieve is something like
> >Be able to support multiple URLs like 'http://localhost:7681/abc' and
> >'http://localhost:7681/xyz' which have different callbacks registered
> >for each url above. From the client side I should be able to invoke
> >either of those urls based on user input. Note that all this is going
> >to be command line and no UI/html required.
> >Any pointers to how to do this or reference code will be greatly
> You want to make the client and the server side? They are two different chunks of code.
> This example shows how to serve dynamic responses over http/s
> You can find the url and respond differently just using the one protocol callback.
> This example shows how to get the data from http client connections.
> You'll get a quicker and better result from playing with those examples until how they work more or less makes sense, then starting your app by basically cutting and pasting those examples and modifying them.
> >Thanks a lot,
> >Libwebsockets mailing list
> >Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets