ret scope issue
comment out sockopt - not being used yet