Click or drag to resize
SphinxClientOpenPersistentConnection Method
Opens a persistent connection to searchd.

Namespace: SphinxConnector.NativeApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax
public void OpenPersistentConnection()
Exceptions
ExceptionCondition
SphinxClientException An error occured while opening the connection. See exception message and inner exception for details.
Examples
using (SphinxClient sphinxClient = new SphinxClient())
{
    sphinxClient.OpenPersistentConnection();

    sphinxClient.Query("myQuery", "myIndex");
    sphinxClient.Query("myOtherQuery", "myIndex");
}
The example above uses the using keyword to close the connection after the queries are executed. Alternatively you can call ClosePersistentConnection or Dispose yourself. Note that the SphinxClient object is still usable after calling Dispose(). It will just open a new (non persistent) connection if another call is made.
See Also