Socket and ip class