# Size of a string to send over socket

**URL:** <https://forum.universal-robots.com/t/size-of-a-string-to-send-over-socket/4964>\
**Category:** URScript\
**Created:** [August 23, 2019, 12:06pm UTC](https://forum.universal-robots.com/t/size-of-a-string-to-send-over-socket/4964 "2019-08-23T12:06:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon94885752](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@anon94885752](https://forum.universal-robots.com/u/anon94885752)\
**Post date:** [August 23, 2019, 12:06pm UTC](https://forum.universal-robots.com/t/size-of-a-string-to-send-over-socket/4964/1 "2019-08-23T12:06:12Z")

</div>

I hope this hasn’t been asked yet, or has clearly been stated.

I’ve been trying to serialize a custom object to string, so i can send it over a socket connection in the scriptwriter.  
But the String is too big to send, i’ve looked around for the allowed size of a string but couldn’t find any.  
Currently just halving my string till i find the right amount, but a set number would help a lot!

---

<div class="post-metadata">

**Author:** ![thph](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@thph](https://forum.universal-robots.com/u/thph)\
**Post date:** [August 26, 2019, 7:16am UTC](https://forum.universal-robots.com/t/size-of-a-string-to-send-over-socket/4964/2 "2019-08-26T07:16:42Z")

</div>

Do you use socket\_send\_string script or append\_line() in the generateScript method in the API? And can you show the _serialize a custom object to string…_ result - what do you get if you print the string?
