Files are delivered asynchronously (“push”) through publish subscribe architecture.
Optionally can request Authorization for files received.
Implements QoS (Quality of Service) for file delivery.
Can handle small, medium and big files using low memory.
// Create websocket client and set server options
oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := 'www.esegece.com';
oClient.Port := 5414;
// Create SGC protocol and assign to websocket client
oFiles := TsgcWSPClient_Files.Create(nil);
oFiles.Client := oClient;
// Handle SGC methods
oFiles.OnSGCConnect := OnSGCConnectHandler;
oFiles.OnSGCDisconnect := OnSGCDisconnectHandler;
// connect to server
oClient.Active := True;
// send file in "c:\myFile.txt"
oSGC.SendFile('c:\myFile.txt');
File protocol allows to send files using binary websocket transport. It can handle big files with a low memory usage.