mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-18 06:54:00 +08:00
Merge pull request #1595 from cesanta/http-client
fixed comment, updated TLS section in makefile
This commit is contained in:
commit
4f63b6093f
@ -1,16 +1,15 @@
|
||||
PROG ?= example
|
||||
ROOT ?= $(realpath $(CURDIR)/../..)
|
||||
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA)
|
||||
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA_CFLAGS)
|
||||
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
|
||||
SSL = ?
|
||||
|
||||
ifneq ($(MBEDTLS),)
|
||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
|
||||
CFLAGS += -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
|
||||
ifeq "$(SSL)" "MBEDTLS"
|
||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
||||
endif
|
||||
|
||||
ifneq ($(OPENSSL),)
|
||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include
|
||||
CFLAGS += -L$(OPENSSL)/lib -lssl -lcrypto
|
||||
ifeq "$(SSL)" "OPENSSL"
|
||||
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
||||
endif
|
||||
|
||||
all: $(PROG)
|
||||
|
@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
|
||||
mg_log_set(log_level); // Set to 0 to disable debug
|
||||
mg_mgr_init(&mgr); // Initialise event manager
|
||||
mg_http_connect(&mgr, s_url, fn, &done); // Create client connection
|
||||
while (!done) mg_mgr_poll(&mgr, 50); // Infinite event loop
|
||||
while (!done) mg_mgr_poll(&mgr, 50); // Event manager loops until 'done'
|
||||
mg_mgr_free(&mgr); // Free resources
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user