Module: connect

Connects with client at the specified Port and IP number after verifying login credentials like username,password and token defined in the 'login' function. If the credentials are incorrect then it throws an error. The 'await' keyword waits for a value of ControlPort and ControlIP. The module ends with a Promise. A promise is an object which can be returned synchronously from an asynchronous function.
Parameters:
Name Type Description
credentials String Refers to all login credentials like username,password and token.
config String Refers to connection configuration like ControlPort and ControlIP
Source: