Torque 3D - Script Manual: SimpleMessageEvent Class Reference

TorqueScript

Main   Class List   Namespace List   Online

SimpleMessageEvent Class Reference
[Networking]

A very simple example of a network event. More...

List of all members.

Static Public Member Functions

static void msg (NetConnection con, string message)
 Send a SimpleMessageEvent message to the specified connection.

Detailed Description

A very simple example of a network event.

This object exists purely for instructional purposes. It is primarily geared toward developers that wish to understand the inner-working of Torque 3D's networking system. This is not intended for actual game development.

See also:
NetEvent for the inner workings of network events

Member Function Documentation

static void SimpleMessageEvent::msg ( NetConnection  con,
string  message 
) [static]

Send a SimpleMessageEvent message to the specified connection.

The far end that receives the message will print the message out to the console.

Parameters:
con The unique ID of the connection to transmit to
message The string containing the message to transmit
Example:
// Send a message to the other end of the given NetConnection
SimpleMessageEvent::msg( %conn, "A message from me!");

// The far end will see the following in the console
// (Note: The number may be something other than 1796 as it is the SimObjectID
// of the received event)
// 
// RMSG 1796  A message from me!


Copyright © GarageGames, LLC. All Rights Reserved.