---
title: "TCP Sampler Config"
description: "Configure the JMeter TCP Sampler Config configuration elements: properties, defaults, and practical usage notes for building reliable load tests."
url: https://docs.jmeter.ai/components/tcp-sampler-config/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# TCP Sampler Config

*Part of the **Configuration Elements** category. Also documented in context in the [full Component Reference](/user-manual/component-reference/#tcp-sampler-config).*

![TCP Sampler Config](/images/screenshots/tcpsamplerconfig.png)

The TCP Sampler Config provides default data for the TCP Sampler

| Name | Required | Description |
| --- | --- | --- |
| Name | No | Descriptive name for this element that is shown in the tree. |
| TCPClient classname | No | Name of the TCPClient class. Defaults to the property `tcp.handler`, failing that `TCPClientImpl`. |
| ServerName or IP | No | Name or IP of TCP server |
| Port Number | No | Port to be used |
| Re-use connection | Yes | If selected, the connection is kept open. Otherwise it is closed when the data has been read. |
| Close connection | Yes | If selected, the connection will be closed after running the sampler. |
| SO_LINGER | No | Enable/disable `SO_LINGER` with the specified linger time in seconds when a socket is created. If you set “`SO_LINGER`” value as `0`, you may prevent large numbers of sockets sitting around with a `TIME_WAIT` status. |
| End of line(EOL) byte value | No | Byte value for end of line, set this to a value outside the range `-128` to `+127` to skip EOL checking. You may set this in `jmeter.properties` file as well with the `tcp.eolByte` property. If you set this in TCP Sampler Config and in `jmeter.properties` file at the same time, the setting value in the TCP Sampler Config will be used. |
| Connect Timeout | No | Connect Timeout (milliseconds, 0 disables). |
| Response Timeout | No | Response Timeout (milliseconds, 0 disables). |
| Set Nodelay | No | Should the nodelay property be set? |
| Text to Send | No | Text to be sent |

## Related

- [CSV Data Set & Parameterization](/topics/csv-data-set-config-guide/)
- [Thread Calculator](/tools/thread-calculator/)
- [Full Component Reference](/user-manual/component-reference/)
- [Functions and Variables](/user-manual/functions/)
