TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
TCPObject Class Reference

Inherits SimObject.

Inherited by HTTPObject.

## Public Member Functions
void | connect (addr)
void | disconnect ()
void | listen (port)
void | openAndConnect (string addr)
void | send (...)
String | URLEncodeString (string data)
Public Member Functions inherited from SimObject
Integer | clone ([copyDynamicFields=false]?)
void | delete ()
Integer | getId ()
void | setName (newName)
String | getName ()
String | getClassNamespace ()
String | getSuperClassNamespace ()
void | setClassNamespace (nameSpace)
void | setSuperClassNamespace ()
Boolean | isMethod (string methodName)
String | call (methodName, [args]*)
void | dumpClassHierarchy ()
void | dump ()
Boolean | isMemberOfClass (string classname)
String | getClassName ()
String | getFieldValue (fieldName)
Boolean | setFieldValue (fieldName, value)
Integer | getDynamicFieldCount ()
String | getDynamicField (index)
Integer | getFieldCount ()
String | getField (int index)
void | setProgenitorFile (file)
String | getProgenitorFile ()
Integer | getType ()
String | getFieldType (fieldName)
void | setInternalName (string InternalName)
String | getInternalName ()
Boolean | isChildOfGroup (groupID)
Integer | getGroup ()
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?)
void | stopTimer ()
Boolean | isTimerActive ()
Integer | schedule (time, command, [arg]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

void connect | ( | addr |  | ) |

Use the connect method to request a connection to a remote agent at the address addr.

Parameters

  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.

Returns
  No return value.

See also
  disconnect

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.

Returns
  No return value.

See also
  connect

void listen | ( | port |  | ) |

Use the listen method to allow this TCPObject to accept connections on the specified port.

Parameters

  port | A value between 1000 and 65536.

Returns
  No return value

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.

Parameters

  ... | Any number of arguments, as strings. Each string is sent separately. i.e. The arguments are not concatenated.

Returns
  No return value

String URLEncodeString | ( | string | data | ) |

Performs URLEncoding on a single string.