Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Socket.WriteMLLP
Writes text to the socket.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Socket | 3.1 | Yes | Yes | Yes | Yes | Yes |
MBS( "Socket.WriteMLLP"; SocketID; Text { ; Encoding } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| SocketID | The socket ID received by Socket.Connect function. | $sock | |
| Text | The text to send. | "Hello World" | |
| Encoding | The text encoding for text parameter. Default is native. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"UTF8" | Optional |
Result
Returns the number of bytes written or an error message.
Description
Writes text to the socket.This function wraps the given text into a MLLP packet by adding start and end bytes.
Result is -1 if socket can't write. See Socket.LastError for error code.
Changed in v10.4 to return error if socket is closed or disconnected instead of -1.
Examples
Write something:
MBS( "Socket.WriteMLLP"; $sock; "Hello World" )
Write something with DOS text encoding:
MBS( "Socket.WriteMLLP"; $sock; "Umlauts: äöü"; "DOS" )
See also
Blog Entries
Created 18th August 2014, last changed 31st August 2020
Socket.WriteHex - Speech.AvailableVoices
Feedback: Report problem or ask question.
Links
MBS Xojo blog