socket: restore 0.8 compatibility