private void VvVnOpsTju(IAsyncResult iasyncResult_0) { try { clientSocket.EndConnect(iasyncResult_0); } catch { } if (clientSocket.Connected) { initArgs(); OnCon onCon = onCon_0; if (onCon != null) { onCon(); } } else { OnCloseCon onCloseCon = onCloseCon_0; if (onCloseCon != null) { onCloseCon(); } Dispose(); } }
private void EndConnectCallback(IAsyncResult ar) { try { socket.EndConnect(ar); policy.OnConnected(); } catch (Exception e) { policy.OnNetworkError(e); } }
private void ConnectCallback(IAsyncResult ar) { try { Socket.EndConnect(ar); OnConnectSuccess(this, null); PostConnect(); BeginReceiveLength(); } catch (Exception e) { Console.WriteLine(e.ToString()); OnConnectFailed(this, e); Disconnect(); } }
private void ConnectCallback(IAsyncResult ar) { try { // Finish connecting _socket.EndConnect(ar); Log.Info("Successfully connected"); OnConnectSuccess(this, null); PostConnect(); // Start receiving BeginReceiveLength(); } catch (Exception e) { Log.Error("Failed to connect", e); OnConnectFailed(this, e); Disconnect(); } }