To send a message,

To close a connection,

//syntax
close();

What about SSL/TLS based sessions? Yes, we support them. In fact, you can start SSL/TLS at any time when the connection is setup.

starttls();

After that, all the messages you send will be encrypted, all the message you receive will be decrypted. You can process messages as if they are clear text. This makes it very easy to debug a SSL/TLS based transaction: you can simply print the message you sent or message you received. This is invaluable since packet captured by sniffers like wireshark may not help (all packets are encrypted!).

Now combined with variables, conditions supported in EP scripting, we can emulate any complex TCP/IP based protocols.
As a simplified real world example, let's emulate a simple SMTP client.

You may notice that we don't do any error checking here, that's because we want to make the basic example look as simple as possible. Adding error checking and handling is not hard with an "if" condition. For instance, we can do the following to check if the server greeting begins with "220",