Files Transfer Protocol
Binary WebSocket transport for transferring files between connected clients with configurable packet sizes, authorization controls, and QoS delivery guarantees.
Binary WebSocket transport for transferring files between connected clients with configurable packet sizes, authorization controls, and QoS delivery guarantees.
Chunked, resumable file transfer subprotocol with selectable QoS, configurable buffer size, and a save directory. Supports big files via per-fragment acknowledgement.
TsgcWSPClient_Files
Chunked file transfer over a WebSocket channel
Windows, macOS, Linux, iOS, Android
Professional / Enterprise
Set BufferSize, SaveDirectory, QoS.Level, then Subscribe and SendFile.
uses
sgcWebSocket, sgcWebSocket_Server, sgcWebSocket_Protocol_Files_Server,
sgcWebSocket_Protocol_Files_Client, sgcWebSocket_Protocol_Files_Message;
// --- Server ----------------------------------------------------
ServerFiles := TsgcWSPServer_Files.Create(nil);
ServerFiles.Server := WSServer;
// --- Client — chunked + resumable -----------------------
ClientFiles := TsgcWSPClient_Files.Create(nil);
ClientFiles.Client := WSClient;
ClientFiles.Files.BufferSize := 8192;
ClientFiles.Files.SaveDirectory := 'C:\\inbox\\';
ClientFiles.Files.QoS.Level := qosLevel1; // acknowledged delivery
ClientFiles.Subscribe('files');
ClientFiles.SendFile('C:\\data\\report.pdf');
5 published properties, 4 methods, 19 events — pulled from the component reference.
Published properties: Client, Broker, Guid.
Events: OnMessage, OnBinary, OnFragmented.
Events: OnConnect, OnDisconnect, OnError.
Methods: WriteData.
Published properties: Version.
Properties: Files.
Authoritative sources for the protocols this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Demo Project — Demos\Protocols\Files Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |