Configuring JMeter Part 11-How to configure TCP Sampler?

In this article we are going to see how can we configure jmeter by changing property of JMeter. In this section we will see the different mode settings for TCP Sampler in jmeter.propertie.

In the jmeter installed bin directory(in my case C:\apache-jmeter-2.8\bin), we get a file named Open this with note pad. Search for tcp sampler section in notepad and get the following. 

-To set default handler class

-To set byte value 111 for end of line[it will be from -128 to +127]
eolByte = 111
-To set this to a value [outside the range -128 to +127] (to skip eol checking)

-To set  TCP Charset
[Note : It is used by org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl default to Platform defaults charset as returned by Charset.defaultCharset().name().]

-To set status.prefix(start with the string, in here Status=) and suffix (strings for enclose the status response code, in here Full stop.)

-To specify (property file to convert codes to messages)

-To set length prefix (for LengthPrefixedBinaryTCPClientImpl implementation)[2 is default]


Note : In that part, I could not use all. I will try this with an example later on.



  1. Can you please provide a scenario where TCP sampler is used? I mean, when do we use TCP sampler and why? Thanks in Advance.

    1. yes, i did 2 years back. it was messaging service test which distributed over TCP protocol from central server. its pretty basic like http sampler. we check not only message response, we had to validate that.

    2. When use? when there is a service exposed in TCP protocol. Usually small firmware/devices communicate each other via TCP protocol over, radio/wifi/Bluetooth communication. To test the service, it is impractical to use the devices sending request to the server. So, use Jmeter..:)