C# Class iSpyApplication.Server.LocalServer

Afficher le fichier Open project: ispysoftware/iSpy Class Usage Examples

Méthodes publiques

Свойство Type Description
ClientConnected System.Threading.AutoResetEvent
NumErr int
ServerRoot string
ServerStartupFailed bool
WebSocketServer iSpyApplication.Server.WebSocketServer

Private Properties

Свойство Type Description
AudioIn void
BuildApijson string
CheckAccess bool
CheckAuth bool
ClientValidationCallback bool
DeleteFiles void
DeviceScannerScanComplete void
DeviceScannerURLFound void
DoCommand string
FormatDays string
FormatTime string
GetCameraWindows List
GetDirectoryPath void
GetFileOptionsList string
GetFromBuffer string
GetObjectList string
GetPropValue object
GetStatus string
GetVar string
GetWidthHeight void
Gzip byte[]
HeaderEnabled bool
LoadJson void
MJPEGFeedMulti void
NV string
NVSet string
OnAuthenticateAsServer void
ParseMimeType void
ParseRequest void
Populate void
PopulateObject void
PopulateResponse dynamic
ProcessCommandInternal string
ProcessRequest void
ReadCallback void
SaveJson void
ScannerDeviceFound void
ScannerScanFinished void
SendAudioFeed void
SendClip void
SendDesktop void
SendFloorPlanFeed void
SendGrab void
SendHeader bool
SendHeader bool
SendHeaderWithRange bool
SendImage void
SendLiveFeed void
SendLogFile void
SendLogFile void
SendMJPEGFeed void
ServeFile void
ServeNotFound void
SetDesiredKeepAlive void
SetKeepAlive void
SetPropValue void
StartListen void
TagUp string
Translate string
Translate void
getJSONObject dynamic

Méthodes publiques

Méthode Description
DisconnectRequest ( HttpRequest req ) : void
Dispose ( ) : void
DoAcceptClientCallback ( IAsyncResult ar ) : void
FormatBytes ( long bytes ) : string
GetMimeType ( string sRequestedFile ) : string

This function takes FileName as Input and returns the mime type..

ReloadAllowedIPs ( ) : void
ReloadAllowedReferrers ( ) : void
SendResponse ( string sHttpVersion, string sMimeType, byte bData, string statusCode, int cacheDays, HttpRequest req, bool gZip = false ) : bool
SendResponse ( string sHttpVersion, string sMimeType, string sData, string statusCode, int cacheDays, HttpRequest req, bool gZip = false ) : bool
SendToBrowser ( byte bSendData, HttpRequest req ) : bool

Sends data to the browser (client)

SendToBrowser ( string sData, HttpRequest req ) : bool
SendToBrowser ( byte bSendData, int datalength, HttpRequest req ) : void

Sends data to the browser (client)

StartServer ( ) : string
StopServer ( ) : void
ThumbnailCallback ( ) : bool

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
AudioIn ( HttpRequest req, int cameraId ) : void
BuildApijson ( string r, string lc ) : string
CheckAccess ( string group, string groups ) : bool
CheckAuth ( string sPhysicalFilePath ) : bool
ClientValidationCallback ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool
DeleteFiles ( int oid, int ot, List files ) : void
DeviceScannerScanComplete ( object sender, EventArgs e ) : void
DeviceScannerURLFound ( object sender, ConnectionOptionEventArgs e ) : void
DoCommand ( string sRequest, int otid, string resp, string cmd, int oid, string fn, string &func ) : string
FormatDays ( IEnumerable d ) : string
FormatTime ( int t ) : string
GetCameraWindows ( string cameraids, int &w, int &h ) : List
GetDirectoryPath ( String sRequest, String sMyWebServerRoot, String &sLocalDir, String &sDirName ) : void
GetFileOptionsList ( string relPath, string filter ) : string
GetFromBuffer ( string buffer, string field ) : string
GetObjectList ( ) : string
GetPropValue ( object src, string propName ) : object
GetStatus ( bool active ) : string
GetVar ( string url, string var ) : string
GetWidthHeight ( string size, int &w, int &h ) : void
Gzip ( byte bytes ) : byte[]
HeaderEnabled ( string req, string header, string val ) : bool
LoadJson ( string sPhysicalFilePath, string sBuffer, string sHttpVersion, HttpRequest req ) : void
MJPEGFeedMulti ( string cameraids, HttpRequest req, int w, int h, bool basicContentType, bool maintainAspectRatio, bool includeOverlay ) : void
NV ( string source, string name ) : string
NVSet ( string source, string name, string value ) : string
OnAuthenticateAsServer ( IAsyncResult result ) : void
ParseMimeType ( String sRequestedFile, string &sFileName, String &sMimeType ) : void
ParseRequest ( string sMyWebServerRoot, string sBuffer, string &sRequest, string &sRequestedFile, string &sErrorMessage, string &sLocalDir, string &sDirName, string &sPhysicalFilePath, string &sHttpVersion, string &sFileName, string &sMimeType, bool &bServe, string &errMessage, HttpRequest req ) : void
Populate ( dynamic item, object o ) : void
PopulateObject ( dynamic d, object o ) : void
PopulateResponse ( string resp, object o, string lc ) : dynamic
ProcessCommandInternal ( string sRequest ) : string
ProcessRequest ( string sBuffer, HttpRequest req ) : void
ReadCallback ( IAsyncResult result ) : void
SaveJson ( string sPhysicalFilePath, string sHttpVersion, string sBuffer, HttpRequest req ) : void
ScannerDeviceFound ( object sender, iSpyApplication.Server.DeviceFoundEventArgs e ) : void
ScannerScanFinished ( object sender, EventArgs e ) : void
SendAudioFeed ( System.Enums streamMode, String sBuffer, String sPhysicalFilePath, HttpRequest req ) : void
SendClip ( String sPhysicalFilePath, string sBuffer, string sHttpVersion, HttpRequest req, bool downloadFile ) : void
SendDesktop ( String sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendFloorPlanFeed ( String sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendGrab ( String sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendHeader ( string sHttpVersion, string sMimeHeader, int iTotBytes, string sStatusCode, int cacheDays, HttpRequest req ) : bool
SendHeader ( string sHttpVersion, string sMimeHeader, int iTotBytes, string sStatusCode, int cacheDays, HttpRequest req, string fileName, bool gZip ) : bool
SendHeaderWithRange ( string sHttpVersion, string sMimeHeader, int iStartBytes, int iEndBytes, int iTotBytes, string sStatusCode, int cacheDays, HttpRequest req, string fileName ) : bool
SendImage ( String sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendLiveFeed ( String sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendLogFile ( string sHttpVersion, HttpRequest req ) : void
SendLogFile ( string sPhysicalFilePath, string sHttpVersion, HttpRequest req ) : void
SendMJPEGFeed ( String sPhysicalFilePath, HttpRequest req ) : void
ServeFile ( string sHttpVersion, string sFileName, String sMimeType, HttpRequest req ) : void
ServeNotFound ( string sHttpVersion, HttpRequest req ) : void
SetDesiredKeepAlive ( System.Net.Socket socket ) : void
SetKeepAlive ( System.Net.Socket s, bool on, uint time, uint interval ) : void
SetPropValue ( object src, string propName, object propValue ) : void
StartListen ( ) : void
TagUp ( string v ) : string
Translate ( string json, string lc ) : string
Translate ( dynamic &item, string lc ) : void
getJSONObject ( string sBuffer ) : dynamic

Method Details

DisconnectRequest() public méthode

public DisconnectRequest ( HttpRequest req ) : void
req HttpRequest
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

DoAcceptClientCallback() public méthode

public DoAcceptClientCallback ( IAsyncResult ar ) : void
ar IAsyncResult
Résultat void

FormatBytes() public méthode

public FormatBytes ( long bytes ) : string
bytes long
Résultat string

GetMimeType() public méthode

This function takes FileName as Input and returns the mime type..
public GetMimeType ( string sRequestedFile ) : string
sRequestedFile string To indentify the Mime Type
Résultat string

ReloadAllowedIPs() public static méthode

public static ReloadAllowedIPs ( ) : void
Résultat void

ReloadAllowedReferrers() public static méthode

public static ReloadAllowedReferrers ( ) : void
Résultat void

SendResponse() public méthode

public SendResponse ( string sHttpVersion, string sMimeType, byte bData, string statusCode, int cacheDays, HttpRequest req, bool gZip = false ) : bool
sHttpVersion string
sMimeType string
bData byte
statusCode string
cacheDays int
req HttpRequest
gZip bool
Résultat bool

SendResponse() public méthode

public SendResponse ( string sHttpVersion, string sMimeType, string sData, string statusCode, int cacheDays, HttpRequest req, bool gZip = false ) : bool
sHttpVersion string
sMimeType string
sData string
statusCode string
cacheDays int
req HttpRequest
gZip bool
Résultat bool

SendToBrowser() public méthode

Sends data to the browser (client)
public SendToBrowser ( byte bSendData, HttpRequest req ) : bool
bSendData byte Byte Array
req HttpRequest HTTP Request
Résultat bool

SendToBrowser() public méthode

public SendToBrowser ( string sData, HttpRequest req ) : bool
sData string
req HttpRequest
Résultat bool

SendToBrowser() public méthode

Sends data to the browser (client)
public SendToBrowser ( byte bSendData, int datalength, HttpRequest req ) : void
bSendData byte Byte Array
datalength int
req HttpRequest HTTP Request
Résultat void

StartServer() public méthode

public StartServer ( ) : string
Résultat string

StopServer() public méthode

public StopServer ( ) : void
Résultat void

ThumbnailCallback() public méthode

public ThumbnailCallback ( ) : bool
Résultat bool

Property Details

ClientConnected public_oe static_oe property

public static AutoResetEvent,System.Threading ClientConnected
Résultat System.Threading.AutoResetEvent

NumErr public_oe property

public int NumErr
Résultat int

ServerRoot public_oe property

public string ServerRoot
Résultat string

ServerStartupFailed public_oe property

public bool ServerStartupFailed
Résultat bool

WebSocketServer public_oe property

public WebSocketServer,iSpyApplication.Server WebSocketServer
Résultat iSpyApplication.Server.WebSocketServer