func (d *DLink) Connect() (*DLConn, error) {
	conn, err := NewDLConn(d.server, d.timeout)
	if err != nil {
		return nil, err
	}

	dl := DLConn{
		Conn: conn,
	}

	if err := dl.SetId(d.program, d.username); err != nil {
		_ = dl.Close()
		return nil, err
	}

	return &dl, nil
}
// Connect returns a DLConn pointer on a successful connection to a datalink server.
Connect returns a DLConn pointer on a successful connection to a datalink server.
// Connect returns a DLConn pointer on a successful connection to a datalink server .
func (d *DLink) Connect() (*DLConn, error) {
	conn, err := NewDLConn(d.server, d.timeout)
	if err != nil {
		return nil, err
	}
	dl := DLConn{
		Conn: conn,
	}
	if err := dl.SetId(d.program, d.username); err != nil {
		_ = dl.Close()
		return nil, err
	}
	return &dl, nil
}
func ( d * DLink ) Connect ( ) ( * DLConn , error ) { conn , err := NewDLConn ( d . server , d . timeout ) if err != nil { return nil , err } dl := DLConn { Conn : conn , } if err := dl . SetId ( d . program , d . username ) ; err != nil { _ = dl . Close ( ) return nil , err } return & dl , nil }
Connect returns a DLConn pointer on a successful connection to a datalink server.
Connect returns a DLConn pointer on a successful connection to a datalink server .