Package org.apache.jmeter.util
Class SlowSocket
java.lang.Object
java.net.Socket
org.apache.jmeter.util.SlowSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
"Slow" (non-SSL) socket implementation to emulate dial-up modems etc
-
Constructor Summary
ConstructorDescriptionSlowSocket
(int cps) Added for use by SlowHC4SocketFactory.SlowSocket
(int cps, String host, int port) SlowSocket
(int cps, String host, int port, InetAddress localAddr, int localPort) SlowSocket
(int cps, String host, int port, InetAddress localAddress, int localPort, int timeout) -
Method Summary
Methods inherited from class java.net.Socket
bind, close, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, supportedOptions, toString
-
Constructor Details
-
SlowSocket
public SlowSocket(int cps, String host, int port, InetAddress localAddress, int localPort, int timeout) throws IOException - Throws:
IOException
-
SlowSocket
public SlowSocket(int cps, String host, int port, InetAddress localAddr, int localPort) throws IOException - Parameters:
cps
- characters per secondhost
- hostnameport
- portlocalAddr
- local addresslocalPort
- local port- Throws:
IOException
- if an I/O error occurs during initializationIllegalArgumentException
- if cps <= 0, or if theport
orlocalPort
values lie outside of the allowed range between0
and65535
-
SlowSocket
- Parameters:
cps
- characters per secondhost
- hostnameport
- port- Throws:
UnknownHostException
- if the name of the host can not be determined automaticallyIOException
- if an I/O error occurs during initializationIllegalArgumentException
- if cps <= 0, or if theport
orlocalPort
values lie outside of the allowed range between0
and65535
-
SlowSocket
public SlowSocket(int cps) Added for use by SlowHC4SocketFactory.- Parameters:
cps
- characters per second
-
-
Method Details
-
getOutputStream
- Overrides:
getOutputStream
in classSocket
- Throws:
IOException
-
getInputStream
- Overrides:
getInputStream
in classSocket
- Throws:
IOException
-