Fixed flags when creating sockets

Changed the flags so that it won't fail when the computer is not connected