Socket.SendMessageHex
---------------------

Sends an UDP data message.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Socket](component_Socket.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Socket.SendMessageHex"; SocketID; IP; Port; Text ) 

**MBS**( **"Socket.SendMessageHex";** /\* Sends an UDP data message. \*/  
**$SocketID**; /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/   
**$IP**; /\* The target IP or name.e.g. "192.168.2.10" \*/   
**$Port**; /\* The target port to send to.e.g. 9000 \*/   
**$Text**) /\* The text to send in hex encoding.e.g. "48656C6C6F" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |
| IP | The target IP or name. | "192.168.2.10" |
| Port | The target port to send to. | 9000 |
| Text | The text to send in hex encoding. | "48656C6C6F" |

### Result

Returns the number of bytes written or an error message.

### Description

Sends an UDP data message.  
Text here is expected to be always hex encoded data.  
### Examples

Write some text:

 MBS ( "Socket.SendMessageHex"; $sock ; "48656C6C6F" )  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.SendMessage](SocketSendMessage.md)

### Release notes

- **Version 14.1**
    - Fixed a problem with [Socket.SendMessageHex](https://www.mbsplugins.eu/SocketSendMessageHex.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 14.1pr1](https://www.mbsplugins.de/archive/2024-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 31st January 2024

  
[Socket.SendMessage](SocketSendMessage.md) - [Socket.SetBroadcast](SocketSetBroadcast.md)

[HTML Version](SocketSendMessageHex.shtml)