Skip to content

Commit

Permalink
Add a QUIC non-blocking demo
Browse files Browse the repository at this point in the history
Show how to write a QUIC client using a non-blocking socket

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #21950)
  • Loading branch information
mattcaswell committed Sep 8, 2023
1 parent 0295364 commit b71784f
Show file tree
Hide file tree
Showing 3 changed files with 394 additions and 3 deletions.
8 changes: 6 additions & 2 deletions demos/guide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ CFLAGS = -I../../include -g
LDFLAGS = -L../..
LDLIBS = -lcrypto -lssl

all: tls-client-block quic-client-block quic-multi-stream tls-client-non-block
all: tls-client-block quic-client-block quic-multi-stream tls-client-non-block \
quic-client-non-block

tls-client-block: tls-client-block.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
Expand All @@ -23,6 +24,9 @@ quic-multi-stream: quic-multi-stream.c
tls-client-non-block: tls-client-non-block.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)

quic-client-non-block: quic-client-non-block.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)

clean:
$(RM) *.o tls-client-block quic-client-block quic-multi-stream \
tls-client-non-block
tls-client-non-block quic-client-non-block
1 change: 0 additions & 1 deletion demos/guide/quic-client-block.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static BIO *create_socket_bio(const char *hostname, const char *port,
}
}


/* Free the address information resources we allocated earlier */
BIO_ADDRINFO_free(res);

Expand Down

0 comments on commit b71784f

Please sign in to comment.