func (r *Receiver) Bind() <-chan ConnStatus {
	r.cl.Lock()
	defer r.cl.Unlock()
	r.chanClose = make(chan struct{})
	if r.cl.client != nil {
		return r.cl.Status
	}
	c := &client{
		Addr:               r.Addr,
		TLS:                r.TLS,
		EnquireLink:        r.EnquireLink,
		EnquireLinkTimeout: r.EnquireLinkTimeout,
		Status:             make(chan ConnStatus, 1),
		BindFunc:           r.bindFunc,
		BindInterval:       r.BindInterval,
	}
	r.cl.client = c
	c.init()
	go c.Bind()
	if r.MergeInterval > 0 {
		if r.MergeCleanupInterval == 0 {
			r.MergeCleanupInterval = 1 * time.Second
		}
		r.mg.mergeHolders = make(map[int]*MergeHolder)
		go r.mergeCleaner()
	}
	return c.Status
}
Bind starts the Receiver. It creates a persistent connection
to the server, update its status via the returned channel,
and calls the registered Handler when new PDU arrives.

Bind implements the ClientConn interface.
package smpp
import (
	"bytes"
	"crypto/tls"
	"fmt"
	"sync"
	"time"
	"github.com/fiorix/go-smpp/smpp/pdu"
	"github.com/fiorix/go-smpp/smpp/pdu/pdufield"
)
type Receiver struct {
	Addr                 string
	User                 string
	Passwd               string
	SystemType           string
	EnquireLink          time.Duration
	EnquireLinkTimeout   time.Duration  
	BindInterval         time.Duration  
	MergeInterval        time.Duration  
	MergeCleanupInterval time.Duration  
	TLS                  *tls.Config
	Handler              HandlerFunc
	SkipAutoRespondIDs   []pdu.ID
	chanClose chan struct{}
	mg struct {
		mergeHolders map[int]*MergeHolder
		sync.Mutex
	}
	cl struct {
		*client
		sync.Mutex
	}
}
type HandlerFunc func(p pdu.Body)
type MergeHolder struct {
	MessageID     int
	MessageParts  []*MessagePart  
	PartsCount    int
	LastWriteTime time.Time
}
type MessagePart struct {
	PartID int
	Data   *bytes.Buffer
}