Undercover police followed a suspected drug user to a man who had Class A drugs.
When they arrested Gerald Griffiths in the Clayton Street area a struggle ensued and he was found with heroin and cocaine.
Griffiths, 50, of Beechwood Road in Bristol, pleaded guilty to two charges of possessing a Class a drug with intent to supply.
He also pleaded guilty to two charges of assaulting an emergency worker.
Judge Julian Lambert jailed him for six years. He told Griffiths: “Police officers are entitled to detain offenders without offenders resorting to violence.
“This is your third Class A drug supply. You have learned nothing from two long sentences previously.”
Ian Fenny, prosecuting by video link, said police found Griffiths with a plastic container.
Inside were 56 wraps of heroin valued at £560 and 11 wraps of cocaine valued at £110.
Mr Fenny told the court: “He demonstrated violence towards police in an attempt to disguise or get rid of what he had and try and avoid arrest.”
Griffiths was also found with two mobile phones, showing evidence of dealing Class A drugs, as well as £881.31 cash.
The drugs and phones were destroyed and the judge confiscated £881.31 under the Proceeds of Crime Act.
Kannan Siva, defending, said in recent years his client had suffered the bereavement of his father, nephew and aunt.
Mr Siva said: “He went back to criminality and he was caught.
“He struggled and he pleaded guilty to assault.
“Fortunately no serious injury was caused.
“He knows it is going to be prison.
“He knows it is going to be some time.
“He knows if he keeps on doing this the sentences will be longer and longer.”
Mr Siva added that his client was not proud of what he had done, but was proud of his two sons who had both engaged in university education.