Green’s Dictionary of Slang

old cock n.

also old cocker, old cock-sparrow
[cock n.2 (1), underpinned by cock n.3 (1)]

1. [mid-17C; late 18C+] a man, esp. as a term of affectionate address.

2. [1950s–60s] (US prison) a veteran prisoner.