V-Blaze and V-Cloud Online Help

Setting up a Sample Callback Server

To follow this example, you must have a callback server running on a given host and port. If you do not already have a callback server, the easiest way to simulate a callback server is to use the netcat application to listen on a specified port and display the information that it receives. The netcat application is a computer networking utility for reading from and writing to network connections using the TCP or UDP protocols. The name of its executable version is typically nc or nc.exe, depending on the operating system that you are using. The netcat utility is included in most Linux distributions and is freely available for most modern operating systems.

The sample output shown later in this section was produced by netcat  that was started using the following Linux command-line command:

while true ; do echo -e "HTTP/1.1 200 OK\r\n" | nc -l 5555; done

V‑Cloud retries submissions to a callback until the callback returns success (HTTP code 200). For this reason, the trivial callback server that we're implementing here with the netcat command, which is listening on port 5555, echoes that success code to the netcat command inside a loop, so that it always sends that success code with anything that is calling it.