I knew it meant “Londoner” but here’s a couple of OED quotations to flesh that out a little:
1617 MINSHEU Ductor s.v., A Cockney or Cockny, applied only to one borne within the sound of Bow-bell, that is, within the City of London, which tearme came first out of this tale: That a Cittizens sonne riding with his father..into the Country..asked, when he heard a horse neigh, what the horse did his father answered, the horse doth neigh; riding farther he heard a cocke crow, and said doth the cocke neigh too? and therfore Cockney or Cocknie, by inuersion thus: incock, q. incoctus i. raw or vnripe in Country-mens affaires. 1617 MORYSON Itin. III. 53 Londiners, and all within the sound of Bow-bell, are in reproch called Cocknies, and eaters of buttered tostes.