func NewClient(c net.Conn, r *circ.Reader, w *circ.Writer, s *system.Info) *Client {
	client := &Client{
		conn:      c,
		r:         r,
		w:         w,
		system:    s,
		keepalive: defaultKeepalive,
		Inflight: Inflight{
			internal: make(map[uint16]InflightMessage),
		},
		Subscriptions: make(map[string]byte),
		State: State{
			started: new(sync.WaitGroup),
			endedW:  new(sync.WaitGroup),
			endedR:  new(sync.WaitGroup),
		},
	}

	client.refreshDeadline(client.keepalive)

	return client
}
// NewClient returns a new instance of Client.
NewClient returns a new instance of Client.
// NewClient returns a new instance of Client .
func NewClient(c net.Conn, r *circ.Reader, w *circ.Writer, s *system.Info) *Client {
	client := &Client{
		conn:      c,
		r:         r,
		w:         w,
		system:    s,
		keepalive: defaultKeepalive,
		Inflight: Inflight{
			internal: make(map[uint16]InflightMessage),
		},
		Subscriptions: make(map[string]byte),
		State: State{
			started: new(sync.WaitGroup),
			endedW:  new(sync.WaitGroup),
			endedR:  new(sync.WaitGroup),
		},
	}
	client.refreshDeadline(client.keepalive)
	return client
}
func NewClient ( c net . Conn , r * circ . Reader , w * circ . Writer , s * system . Info ) * Client { client := & Client { conn : c , r : r , w : w , system : s , keepalive : defaultKeepalive , Inflight : Inflight { internal : make ( map [ uint16 ] InflightMessage ) , } , Subscriptions : make ( map [ string ] byte ) , State : State { started : new ( sync . WaitGroup ) , endedW : new ( sync . WaitGroup ) , endedR : new ( sync . WaitGroup ) , } , } client . refreshDeadline ( client . keepalive ) return client }
NewClient returns a new instance of Client.
NewClient returns a new instance of Client .