//
// Delivery Service client
//
Delivery Service client
// // Delivery Service client //
func (ds *DeliveryService) Run(client DeliveryServiceClientInterface) error {
	conn, err := net.Dial("tcp", ds.addr)
	if err != nil {
		return err
	}
	ds.conn = conn
	for {
		if err = client.Handler(conn); err != nil {		
			if isEOF(err) {
				err = nil
			}
			return err
		}
	}
}
func ( ds * DeliveryService ) Run ( client DeliveryServiceClientInterface ) error { conn , err := net . Dial ( " " , ds . addr ) if err != nil { return err } ds . conn = conn for { if err = client . Handler ( conn ) ; err != nil { if isEOF ( err ) { err = nil } return err } } }
Delivery Service client
Delivery Service client
// let the Handler to handle the error as well