Refactoring. Added a functions that checks IP and Port.
Refactoring. Added a functions that checks IP and Port.