func (nt *NetCatClient) Write(data []byte) (err error) {
	dataWithMli := AddMLI(nt.mliType, data)
	_, err = nt.conn.Write(dataWithMli)
	return err
}
Write writes data into the socket after adding the necessary length prefix as per the MLI type
set on the netcat client
package net
import (
	"encoding/binary"
	"net"
	"time"
)
type MliType string
const (
	Mli2i MliType = "2i"
	Mli2e MliType = "2e"
	Mli4e MliType = "4e"
	Mli4i MliType = "4i"
)
type NetCatClient struct {
	serverAddr string
	mliType    MliType
	conn       net.Conn
}
type ReadOptions struct {
	Deadline time.Time
}
func NewNetCatClient(addr string, mliType MliType) *NetCatClient {
	var nt NetCatClient
	nt.mliType = mliType
	nt.serverAddr = addr
	return &nt
}
func (nt *NetCatClient) OpenConnection() (err error) {
	nt.conn, err = net.Dial("tcp4", nt.serverAddr)
	return err
}
func (nt *NetCatClient) Close() {
	_ = nt.conn.Close()
}