Go library for qsocket...
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.
Usage is really simple, qsocket.NewSocket()
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.NewSocket(qsocket.Client, "my-secret");
// Create a new QSocket server...
qsock := qsocket.NewSocket(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.