TCP Virtual Service Properties
TCP virtual APIs (virtual services) have a set of properties similar to those of other virtual services. To view or change them, select your service in the Navigator panel. You will see the properties in the right part of the ReadyAPI window and in the bottom-left corner of the Navigator panel:
![]() |
Properties on the Right
The properties are organized into several groups.
Info
Property | Description |
---|---|
Location | The computer where the virtual service resides. |
Time running | The duration of the service run. 0 if the virtual service is not running. |
Status | Indicates whether the virtual service is running. |
Received | The number of incoming requests (including those requests for which the service has no virtual operations). |
Sent | The number of responses the virtual service sent to clients. |
Port | The port number the virtual service will use for the run. Also, view and change it in the property list in the Navigator panel. ImportantAlways assign a separate port for TCP services, otherwise ReadyAPI will not launch such a service along with with other services on the same port. To start your service from the command line, use the |
Virtual service socket | The basic socket you can use to access the virtual service. |
Autostart on server | Commands the virtual service to start automatically right after you deploy it to a remote computer. |
Enable SSL | Commands the virtual service to always work through secured connections. |
Request Delimiter
The delimiter that the TCP virtual service uses to recognize requests in the incoming data stream. Possible values are –
– A specific set of bytes or characters. For example, if3B
is the request delimiter and is the code type, the TCP virt splits the following hexadecimal data stream into 3 separate requests:62 72 61 76 65 3B 20 6E 65 77 3B 20 77 6F 72 6C 64
Once the service finds
3B
, it identifies all the bytes before the delimiter as request data, and starts listening for another request.Tip
To learn about the editor displayed for the option, see the TCP Virtual Service description.
– The maximum length of the request message, in bytes.
Virtual Service Scripting for information on writing scripts and on the available script objects.
– The script you can write to create your own segment processing scenario. See– If selected, the service treats each TCP segment as a separate request.
Note
Don’t include the request delimiter character in request data when you are editing virtual requests of the TCP virtual service. Doing this will cause incorrect request recognition. For more information on the delimiter role, see Request and Response Dispatching.
Response Delimiter
The delimiter that the TCP virtual service uses to separate responses in the data stream it sends. See Request and Response Dispatching. Possible values are –
– A specific set of bytes or characters. For example, if3B
is the response delimiter, is the code type, and the response is62 72 61 76 65
, the TCP virt will dispatch the following hexadecimal data stream:62 72 61 76 65 3B
The service automatically appends
3B
to the response data, so the client can identify the response bounds properly.Tip
To learn about the editor displayed for the option, see the TCP Virtual Service description.
– The maximum length of the response message, in bytes.
Virtual Service Scripting for information on writing scripts and on the available script objects.
– The script you can write to create your own response sending scenario. See– If selected, the service treats each TCP segment as a separate response.
Note
Don’t include the request delimiter character in the response data. Otherwise, the TCP virtual service will not be able to detect the incoming request correctly. For more information, see Request and Response Dispatching.
Description
Arbitrary text describing your TCP virtual service. This is the same text you can view and change in the property list in the Navigator.
Start Script
The script that is executed right after the virtual service starts. For information on writing scripts and on the available script objects, see Virtual Service Scripting.
Stop Script
The script that is executed right before the virtual service stops. See Virtual Service Scripting for information on writing scripts and on the available script objects.
OnRequest Script
The script that is executed right after the virtual service receives an incoming request.
Note
The script is executed for all the requests, including those for which your service has no virtual operations.
See Virtual Service Scripting for information on writing scripts and on the available script objects.
AfterRequest Script
The script that is executed after the virtual service replies to the incoming request.
Note
The script is executed for all the requests, including those for which your service has no virtual operations.
See Virtual Service Scripting for information on writing scripts and on the available script objects.