Class TCPClientImpl
java.lang.Object
org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl
- All Implemented Interfaces:
TCPClient
Sample TCPClient implementation.
Reads data until the defined EOL byte is reached.
If there is no EOL byte defined, then reads until
the end of the stream is reached.
The EOL byte is defined by the property "tcp.eolByte".
-
Field Summary
Fields inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
eolByte, useEolByte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(InputStream is) Deprecated.read
(InputStream is, SampleResult sampleResult) Reads data until the defined EOL byte is reached.void
write
(OutputStream os, InputStream is) void
write
(OutputStream os, String s) Methods inherited from class org.apache.jmeter.protocol.tcp.sampler.AbstractTCPClient
getCharset, getEolByte, setCharset, setEolByte, setupTest, teardownTest
-
Constructor Details
-
TCPClientImpl
public TCPClientImpl()
-
-
Method Details
-
write
- Parameters:
os
- - OutputStream for sockets
- - String to write- Throws:
IOException
- when writing fails
-
write
- Parameters:
os
- - OutputStream for socketis
- - InputStream to be written to Socket- Throws:
IOException
- when writing fails
-
read
Deprecated.- Parameters:
is
- - InputStream for socket- Returns:
- String read from socket
- Throws:
ReadException
- exception that can contain partial response (Response until error occurred)
-
read
Reads data until the defined EOL byte is reached. If there is no EOL byte defined, then reads until the end of the stream is reached.- Specified by:
read
in interfaceTCPClient
- Overrides:
read
in classAbstractTCPClient
- Parameters:
is
- - InputStream for socketsampleResult
-SampleResult
- Returns:
- String read from socket
- Throws:
ReadException
- exception that can contain partial response- See Also:
-