Made sock local
Rename result to res
Rename socket to sock