TorqueScript Reference
|
#include <tcpObject_ScriptBinding.h>
Inherits SimObject.
Inherited by HTTPObject.
void connect | ( | addr | ) |
Use the connect method to request a connection to a remote agent at the address addr.
addr | A string containing an address of the form: ?A.B.C.D:Port?, where A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536. |
void disconnect | ( | ) |
Use the disconnect method to close a previously opened connection without destroying the requesting TCPOpbject. This will close any open connection, but not destroy this object. Thus, the object can be used to open a new connection.
void listen | ( | port | ) |
Use the listen method to allow this TCPObject to accept connections on the specified port.
port | A value between 1000 and 65536. |
void openAndConnect | ( | string | addr | ) |
Connect to the given address, making sure that the connection is open first.
void send | ( | ... | ) |
Use the send method to send any number of parameters, as strings, one at a time to the agent at the other end of the connection.
... | Any number of arguments, as strings. Each string is sent separately. i.e. The arguments are not concatenated. |
String URLEncodeString | ( | string | data | ) |
Performs URLEncoding on a single string.