Categorygithub.com/qsocket/qsocket-go
repositorypackage
0.0.8-beta
Repository: https://github.com/qsocket/qsocket-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

QSocket Go

Go library for qsocket...

Documentation

GoDoc Go Report Card License: MIT

[!WARNING]
This library is in its early alpha development stage, featuring experimental functionality that may lack backwards compatibility, and users are advised to exercise caution and not use it in production environments.

Example

Usage is really simple, qsocket.New() function simply creates a new quantum socket with given secret, it includes all the functions of standard net sockets and also implements io Read/Write. After creating a socket you need to dial the QSRN network by calling Dial* functions. Simple example below...

    // Create a new QSocket client...
    qsock := qsocket.New(qsocket.Client, "my-secret");
    // Create a new QSocket server...
    qsock := qsocket.New(qsocket.Server, "my-secret");
    
    qsock.Dial(true)  // Dial using TLS...
    // OR
    qsock.Dial(false) // Dial using TCP... 

    // Dial using a socks5 proxy over TLS
    qsock.SetProxy("127.0.0.1:9050")
    qsock.Dial(true)

After dialing the QSRN, socket is ready for read/write operations. Check here and qs-netcat for more usage examples.