AniDBmini.AniDBAPI.AniDBAPI C# (CSharp) Method

AniDBAPI() public method

public AniDBAPI ( string server, int port, int localPort ) : System
server string
port int
localPort int
return System
		public AniDBAPI(string server, int port, int localPort)
        {
#if !DEBUG
            apiserver = new IPEndPoint(IPAddress.Any, localPort);

        retry:
            try
            {
                conn.Connect(server, port);
                isConnected = true;
            }
            catch (SocketException)
            {
                if ((MessageBox.Show("Unable to connect to api server!\nWould you like to try again?",
                                "Connection Error!", MessageBoxButton.YesNo, MessageBoxImage.Error)) == MessageBoxResult.Yes)
                    goto retry;
            }
#else
            isConnected = true;
#endif
        }