EasyManuals Logo

Cisco 11503 - CSS Content Services Switch User Manual

Cisco 11503 - CSS Content Services Switch
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #288 background imageLoading...
Page #288 background image
Chapter 8 Using the CSS Scripting Language
Special Variables
8-20
Cisco Content Services Switch Administration Guide
OL-5647-02
SOCKET Variable
The SOCKET variable contains the connection ID associated with a host. When
you connect to a remote host, the SOCKET variable is set so that you can send
and receive messages by referring to this variable. When you use the socket
commands, the SOCKET variable is set automatically (see “Using socket
Commands” later in this chapter). When you make multiple connections using the
socket commands, save the SOCKET variable to another variable or it will be
overwritten.
For example, enter:
set EXIT_MSG “Failure to connect to host”
socket connect host 1.1.1.1 port 80
no set EXIT_MSG
set EXIT_MSG “Send: Failure”
socket send ${SOCKET} “GET /index.html\n\n”
no set EXIT_MSG
! Save current socket ID
set OLD_SOCKET “${SOCKET}”
! The new socket connect command will overwrite the old
! ${SOCKET} variable
set EXIT_MSG “Failure to connect to host”
socket connect host 1.1.1.1 port 80
no set EXIT_MSG
set EXIT_MSG “Send: Failure”
socket send ${SOCKET} “GET /index.html\n\n”
no set EXIT_MSG
set EXIT_MSG “Waitfor: Failed”
socket waitfor ${OLD_SOCKET} “200 OK”
socket waitfor ${SOCKET} “200 OK”
! Finished, cleanup
no set EXIT_MSG
socket disconnect ${OLD_SOCKET}
socket disconnect ${SOCKET}

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco 11503 - CSS Content Services Switch and is the answer not in the manual?

Cisco 11503 - CSS Content Services Switch Specifications

General IconGeneral
BrandCisco
Model11503 - CSS Content Services Switch
CategorySwitch
LanguageEnglish

Related product manuals