WebSocket SendMessageFromFile Method (String, Boolean)C# API
Send a message to the server, by loading the message data from a file.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax

public void SendMessageFromFile(
	string path,
	bool isBinary
)

Parameters

path
Type: System String
The path of the filename, relative to the Virtual User's data directory.
isBinary
Type: System Boolean
If set to true, then the message will be flagged as binary data. Otherwise, it will be flagged as text.
Remarks

The WebSocket must be opened, by calling the Open  method, before any messages can be sent to the server. 4096 bytes will be sent to the server at a time. If you want to use a different chunk size, then use the SendMessageFromFile(String, Boolean, Int32) overload.

Note Note
If you are using this method in your script, make sure that the file containing the data is in the data/Files directory within your project.

See Also