Completes the asynchronous operation started in BeginConnect.
Before calling BeginConnect, you need to create a callback method that implements the AsyncCallback delegate. This callback method executes in a separate thread and is called by the system after BeginConnect returns. The callback method must accept the IAsyncResult returned by the BeginConnect method as a parameter. This parameter may then be passed to the EndConnect method to complete the operation.