func NewDLConn(service string, timeout time.Duration) (*DLConn, error) {
	if !strings.Contains(service, ":") {
		service = net.JoinHostPort(service, "18000")
	}
	client, err := net.Dial("tcp", service)
	if err != nil {
		return nil, err
	}

	conn := DLConn{
		Conn:    client,
		timeout: timeout,
	}

	return &conn, nil
}
// NewDLConn makes a connection to a datalink service, the function
// SetId should be run after the connection is made and Close
// should be called when the link is no longer required.
NewDLConn makes a connection to a datalink service, the function
SetId should be run after the connection is made and Close
should be called when the link is no longer required.
// NewDLConn makes a connection to a datalink service the function // SetId should be run after the connection is made and Close // should be called when the link is no longer required .
func NewDLConn(service string, timeout time.Duration) (*DLConn, error) {
	if !strings.Contains(service, ":") {
		service = net.JoinHostPort(service, "18000")
	}
	client, err := net.Dial("tcp", service)
	if err != nil {
		return nil, err
	}
	conn := DLConn{
		Conn:    client,
		timeout: timeout,
	}
	return &conn, nil
}
func NewDLConn ( service string , timeout time . Duration ) ( * DLConn , error ) { if ! strings . Contains ( service , " " ) { service = net . JoinHostPort ( service , " " ) } client , err := net . Dial ( " " , service ) if err != nil { return nil , err } conn := DLConn { Conn : client , timeout : timeout , } return & conn , nil }
NewDLConn makes a connection to a datalink service, the function
SetId should be run after the connection is made and Close
should be called when the link is no longer required.
NewDLConn makes a connection to a datalink service the function SetId should be run after the connection is made and Close should be called when the link is no longer required .