单项选择题

I was almost asleep last night when I suddenly heard someone__________ at the door.

A.be knocking
B.knocking
C.to knock
D.having knocked