Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Server.Client Namespace / HubConnection Class / CanConnect Method / CanConnect() Method

In This Topic
    CanConnect() Method
    In This Topic
    Attempts to connect to the server and returns information about the connection status.
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(Gibraltar.Server.Client.HubConnection/d__35)> 
    Public Overloads Function CanConnect() As Task(Of HubConnectionStatus)
    [AsyncStateMachine(Gibraltar.Server.Client.HubConnection/d__35)] 
    public Task<HubConnectionStatus> CanConnect()

    Return Value

    True if the configuration is valid and the server is available, false otherwise.
    Remarks
    This method will keep the connection if it is made, improving efficiency if you are then going to use the connection.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also