Removed checking socket type.