Software defined networks (SDN) is perceived to have specific capabilities for utilization by network infrastructures automatically. The success of OpenFlow protocol is to decouple control plane from data plane completely. However, current SDN still regards the network as a group of devices rather than a holistic resource, and traffic monitoring and control only relies on network states but not including traffic behaviours. Although speed of packet forwarding is improved significantly, QoS demands can not be satisfied when network congested, unavailability of SDN in some resource constrained scenes does not present well. To address this, we propose an application-aware traffic control scheme, in which both network states and traffic behaviours are exploited cooperatively. Deep Packet Inspection (DPI) is introduced into SDN controller. Meanwhile, a mechanism for packet classification and behaviour matching is designed. To perform information exchange between components, a publish/subscribe based middle ware is designed. Besides, mathematical models for analysing network throughput and latency are established. Simulation results show that proposed scheme can facilitate the improvement of throughput and reduce latency time of end-to-end communication.