Quic Error

152 views
Skip to first unread message

Muhammad Tauqeer

unread,
Feb 14, 2023, 12:00:12 PM2/14/23
to QUIC Prototype Protocol Discussion group
I am facing error after running the quic file. When I create the server.go and client.go then there qui.session undefined shows and when I use the following code then there is also errors I facing.

The code are as;

package main

import (
"context"
"crypto/tls"
"fmt"
"io"

)

func main() {
// Set up the QUIC configuration
quicConfig := &quic.Config{
MaxIdleTimeout: 10000,
}

// Establish a QUIC session with the remote server
session, err := quic.DialAddrContext(context.Background(), "google.com:443", &tls.Config{InsecureSkipVerify: true}, quicConfig)
if err != nil {
fmt.Println("Failed to connect to server:", err)
return
}
defer session.CloseWithError(0, "")

// Open a QUIC stream for sending data
stream, err := session.OpenStreamSync(context.Background())
if err != nil {
fmt.Println("Failed to open stream:", err)
return
}
defer stream.Close()

// Send some data over the QUIC stream
fmt.Fprintln(stream, "Hello, server!")

// Receive some data over the QUIC stream
buffer := make([]byte, 1024)
n, err := stream.Read(buffer)
if err != nil {
if err != io.EOF {
fmt.Println("Error reading from stream:", err)
return
}
}
fmt.Println("Received from server:", string(buffer[:n]))

// Gracefully close the QUIC session and any associated connections
session.CloseWithError(0, "")
}



OUTPUT::::::

Failed to connect to server: CRYPTO_ERROR 0x178 (remote) (frame type: 0x6): 28:TLS handshake failure (ENCRYPTION_INITIAL) 120: no application protocol


Muhammad Tauqeer

unread,
Feb 15, 2023, 10:05:47 AM2/15/23
to proto...@chromium.org
Anyone help me in this…???

--
You received this message because you are subscribed to the Google Groups "QUIC Prototype Protocol Discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proto-quic+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/proto-quic/95707331-01f6-47b8-ac4b-0c46edd732f9n%40chromium.org.
--
Thanks and Regards
Muhammad Tauqeer

Ryan Hamilton

unread,
Feb 17, 2023, 7:44:19 PM2/17/23
to proto...@chromium.org
This list is for Google QUIC implementation which is written in C++, not go. I think you might need to find a different list to ask the question.

Reply all
Reply to author
Forward
0 new messages