func (s *Socket) executeOrder(p Payload) {
	tp := NewTradePayload()

	if err := tp.DecodeTradePayload(p); err != nil {
		log.Printf("Error: %v", err)
	}

	t := tp.Trade

	t.events = s.events

	err := s.server.engine.ExecuteOrder(t)
	if err != nil {
		log.Printf("Error: %v", err)
	}

	fmt.Printf("\nLOG: Executing order. Payload:\n%v\n\n", t)
}
// executeOrder decodes the message payload before passing it to the transaction handler
executeOrder decodes the message payload before passing it to the transaction handler
// executeOrder decodes the message payload before passing it to the transaction handler
func (s *Socket) executeOrder(p Payload) {
	tp := NewTradePayload()
	if err := tp.DecodeTradePayload(p); err != nil {
		log.Printf("Error: %v", err)
	}
	t := tp.Trade
	t.events = s.events
	err := s.server.engine.ExecuteOrder(t)
	if err != nil {
		log.Printf("Error: %v", err)
	}
	fmt.Printf("\nLOG: Executing order. Payload:\n%v\n\n", t)
}
func ( s * Socket ) executeOrder ( p Payload ) { tp := NewTradePayload ( ) if err := tp . DecodeTradePayload ( p ) ; err != nil { log . Printf ( " " , err ) } t := tp . Trade t . events = s . events err := s . server . engine . ExecuteOrder ( t ) if err != nil { log . Printf ( " " , err ) } fmt . Printf ( " \n \n \n \n " , t ) }
executeOrder decodes the message payload before passing it to the transaction handler
executeOrder decodes the message payload before passing it to the transaction handler