The current TCP Sampler creates a new socket for each sampler occurrence in each thread. I do plan to add re-usable sockets to the TCP Sampler, but that probably won't be for a few weeks.
One way to re-use the same socket might to have only a single sampler, and vary the content of the request using a function call to read it from a file. However, I've not tried this. == Note that the TCPSampler class is the one that creates the socket. The TCPClientImpl class uses the socket to implement the protocol. The current protocol sends the string as is, and reads bytes until the EOL byte is seen. EOL can be defined by the property tcp.eolByte. == JMeter is built around the assumption of a request/response sample. There's currently no provision for reading from a socket without previously writing to it, but that would be trivial to add - I may well add that to the nightly code shortly. Or indeed it may already work if you provide an empty string. But the test plan would have to include samplers for each expected server response. If a single client request results in a known number of responses, or there is some other way of telling that the server has finished responding to the original request, then the TCPClientImpl read() method could implement this. S. On 21/07/05, Zohar Amir <[EMAIL PROTECTED]> wrote: > Thanks, but I think I did not explain myself clear enough. > The session is set up by opening a TCP connection and sending a login > request. From that point on, all transactions (both from the server and from > the client) are sent on that same connection (=same socket). I suspect > Jmeter was build with HTTP in mind and a symmetrical protocol (e.g., TCP) > challenges its design. > Any help on this please? > > ----- Original Message ----- > From: "Christian Baumgartner" <[EMAIL PROTECTED]> > To: "'JMeter Users List'" <[email protected]> > Sent: Thursday, July 21, 2005 9:27 AM > Subject: AW: TCP session > > > Maybe you want to use the URL REWRITE MODIFIER that stores the session ID > and replaces it in every request. (if you use session id in you r URL.. Else > there is the posibility to use the cookie manager that fetches the cookies, > and you can use them as normal variables for assertions .. > > Maybe you specify in more detail how the session is set up, what method is > used (think it is a session). > > > -----Ursprüngliche Nachricht----- > Von: Zohar Amir [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 21. Juli 2005 07:16 > An: [email protected] > Betreff: TCP session > > > Hi, > I need to emulate a client's behavior with Jemeter. The client connects to > the server via TCP. The connection is set up on login and kept throughout > the session, where transactions are exchanged with the server. Any way of > doing his with Jmeter? I probably need to open a TCP socket on > startup and use this same socket for all transactions. I also need a thread > listening on the socket for incoming transactions. > Thanks, > Zohar. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

