Files Transfer Protocol

Binary WebSocket transport for transferring files between connected clients with configurable packet sizes, authorization controls, and QoS delivery guarantees.

File Transfers Over WebSocket

Send and receive files of any size through WebSocket connections with built-in chunking and progress tracking.

Reliable Binary File Transfer

The Files protocol uses WebSocket binary frames to transfer files between clients and server. Files are split into configurable-size packets, transmitted sequentially, and reassembled on the receiving end. The protocol includes authorization controls to restrict who can send or receive files, QoS levels for delivery guarantees, and acknowledgment mechanisms to confirm successful receipt.

  • Configurable packet sizes for optimal throughput
  • Authorization controls for file access
  • QoS levels and acknowledgment
  • Progress tracking for large files
FILE FILE binary 67%

Delphi File Transfer Example

Send a file to a connected client through the WebSocket server.

uses
  sgcWebSocket_Client, sgcWebSocket_Types,
  sgcWebSocket_Protocol_Files_Client;

var
  WSClient: TsgcWebSocketClient;
  FilesProtocol: TsgcWSPClient_Files;

procedure TForm1.FormCreate(Sender: TObject);
begin
  WSClient := TsgcWebSocketClient.Create(nil);
  WSClient.Host := 'myserver.example.com';
  WSClient.Port := 443;

  FilesProtocol := TsgcWSPClient_Files.Create(nil);
  FilesProtocol.Client := WSClient;
  FilesProtocol.OnFileReceived := OnFileReceived;

  WSClient.Active := True;
end;

procedure TForm1.ButtonSendFileClick(Sender: TObject);
begin
  // Send a file to the server
  FilesProtocol.SendFile('C:\Documents\report.pdf');
end;

procedure TForm1.OnFileReceived(Sender: TObject;
  const aFileName: string);
begin
  Memo1.Lines.Add('File received: ' + aFileName);
end;

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Ready to Transfer Files Over WebSocket?

Download the free trial and add file transfer support to your application.