Put the socket in a struct

Maybe a bad idea?