Code Added for muliple socket handling