Socket.ReadAllHex
-----------------

Reads bytes from socket and returns them hex encoded.

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

MBS( "Socket.ReadAllHex"; SocketID ) 

**MBS**( **"Socket.ReadAllHex";** /\* Reads bytes from socket and returns them hex encoded. \*/  
**$SocketID**) /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |

### Result

Returns text encoded as hex or error message.

### Description

Reads bytes from socket and returns them hex encoded.  
This function will look how much is in read buffer and query all bytes inside.  
### Examples

Read all bytes and return them as:

 $value = MBS ( "Socket.ReadAllHex"; $port ; 8 )  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.PeekAllHex](SocketPeekAllHex.md)
- [Socket.Read](SocketRead.md)
- [Socket.ReadAll](SocketReadAll.md)
- [Socket.ReadHex](SocketReadHex.md)
- [Socket.ReadLineHex](SocketReadLineHex.md)

### Blog Entries

- [Socket changes for MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2020-08-31/Socket_changes_for_MBS_FileMak/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.3pr11](https://www.mbsplugins.de/archive/2014-09-14/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 11st September 2014 , last changed 11st September 2014

  
[Socket.ReadAll](SocketReadAll.md) - [Socket.ReadHex](SocketReadHex.md)

[HTML Version](SocketReadAllHex.shtml)