Skip to content

TCP Sampler Config

Configure the JMeter TCP Sampler Config configuration elements: properties, defaults, and practical usage notes for building reliable load tests.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Part of the Configuration Elements category. Also documented in context in the full Component Reference.

TCP Sampler Config

The TCP Sampler Config provides default data for the TCP Sampler

NameRequiredDescription
NameNoDescriptive name for this element that is shown in the tree.
TCPClient classnameNoName of the TCPClient class. Defaults to the property tcp.handler, failing that TCPClientImpl.
ServerName or IPNoName or IP of TCP server
Port NumberNoPort to be used
Re-use connectionYesIf selected, the connection is kept open. Otherwise it is closed when the data has been read.
Close connectionYesIf selected, the connection will be closed after running the sampler.
SO_LINGERNoEnable/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 valueNoByte 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 TimeoutNoConnect Timeout (milliseconds, 0 disables).
Response TimeoutNoResponse Timeout (milliseconds, 0 disables).
Set NodelayNoShould the nodelay property be set?
Text to SendNoText to be sent
On this page