Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom van der Woerdt TvdW

View GitHub Profile
View test.c
#include <string.h>
#include <curl/curl.h>
#include <assert.h>
#include <unistd.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
View test.go
package main
import (
"net/http"
)
func main() {
srv := &http.Server{Addr: ":443", Handler: http.HandlerFunc(handle)}
srv.ListenAndServeTLS("fullchain.pem", "privkey.pem")
}
View test.c
#include <string.h>
#include <curl/curl.h>
#include <assert.h>
#include <unistd.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
View test.go
package main
import (
"context"
"log"
"net/http"
"time"
)
func main() {
View test.c
#include <string.h>
#include <curl/curl.h>
#include <assert.h>
#include <unistd.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
View test.c
2019-06-24 14:35:08.221 pid: 29249 - BEGIN POST http://my.service/retrieve
2019-06-24 14:35:08.221 pid: 29249 - * STATE: INIT => CONNECT handle 0x7f72bbc40808; line 1356 (connection #-5000)
2019-06-24 14:35:08.221 pid: 29249 - * Connecting to hostname: 127.0.0.1
2019-06-24 14:35:08.221 pid: 29249 - * Connecting to port: 9211
2019-06-24 14:35:08.221 pid: 29249 - * Found bundle for host 127.0.0.1: 0x7f72b910d0c8 [can multiplex]
2019-06-24 14:35:08.221 pid: 29249 - * Re-using existing connection! (#0) with host my.service
2019-06-24 14:35:08.221 pid: 29249 - * Connected to 127.0.0.1 (127.0.0.1) port 9211 (#0)
2019-06-24 14:35:08.221 pid: 29249 - * STATE: CONNECT => DO handle 0x7f72bbc40808; line 1405 (connection #0)
2019-06-24 14:35:08.221 pid: 29249 - * http2_send len=460
2019-06-24 14:35:08.221 pid: 29249 - * h2 header: :method:POST
View test.c
#include <string.h>
#include <curl/curl.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
int socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
View test.c
#include <string.h>
#include <curl/curl.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
int socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
View test.c
#include <string.h>
#include <curl/curl.h>
fd_set wfds;
fd_set rfds;
struct timeval tv;
int maxfd = 0;
int socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
View curl.log
* STATE: INIT => CONNECT handle 0x25b46a8; line 1346 (connection #-5000)
* Added connection 0. The cache now contains 1 members
* Trying 127.0.0.1:81...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x25b46a8; line 1402 (connection #0)
* Connected to 127.0.0.1 (127.0.0.1) port 81 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x25b46a8; line 1522 (connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x25b46a8; line 1540 (connection #0)
* HTTP/2 over clean TCP
You can’t perform that action at this time.