Socket.SetTag
-------------

Sets the tag of the socket.

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

MBS( "Socket.SetTag"; SocketID; Value ) 

**MBS**( **"Socket.SetTag";** /\* Sets the tag of the socket. \*/  
**$SocketID**; /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/   
**$Value**) /\* The new tag value.e.g. Get(RecordID) \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |
| Value | The new tag value. | Get(RecordID) |

### Result

Returns OK or error.

### Description

Sets the tag of the socket.  
See also [Socket.GetTag](SocketGetTag.md).  
With the tag, we allow you to associate a text with the socket, for example a record ID.  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.GetTag](SocketGetTag.md)
- [Socket.SetDataAvailableHandler](SocketSetDataAvailableHandler.md)
- [Socket.SetNewConnectionHandler](SocketSetNewConnectionHandler.md)

### Release notes

- **Version 8.3**
    - Added [Socket.GetTag](http://www.mbsplugins.eu/SocketGetTag.shtml) and [Socket.SetTag](http://www.mbsplugins.eu/SocketSetTag.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 8.3pr2](https://www.mbsplugins.de/archive/2018-06-18/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 6th June 2018 , last changed 6th June 2018

  
[Socket.SetSendBufferSize](SocketSetSendBufferSize.md) - [Socket.SetTimeToLive](SocketSetTimeToLive.md)

[HTML Version](SocketSetTag.shtml)