ConnectionInfoSet
Sets a piece of information about the connection.
This will set a piece of information about the connection.
The types of information are:
"ip" - The user's IP address. This doesn't affect the real IP address used, but is useful for record keeping.
"status" - The current status of the connection, such as "logging on".
"user" - Name of the user.
"uniqueid" - Uniquely identifies user's machine. Empty string if no ID.
"character" - Name of the user's character.
"object" - The object that will be used to send the ConnectionMessage() and ConnectionError() messages to. Changing this will redirect the messages to a different object.
Parameter Name
|
Description
|
ConnectionIdent
|
Connection number to set info about.
|
InfoString
|
String indicating the type of information to send, such as "ip".
|
Value
|
New value to set.
|
Return value description
|
Returns true if the value was changed, false if it failed to be changed.
|
ConnectionNew
Called by the server when a new user connects.
This function is called by the server when a new user connects to the server. The function creates a "Connection" object and returns that object. Any further callbacks, such as ConnectionMessage() and ConnectionError() will be sent to the connection object.
You may override this with your own function.
Parameter Name
|
Description
|
ConnectionIdent
|
Number that uniquely identifies the connection. The created object will remember this connection number.
|
Return value description
|
Object that's associated with the connection. From now on, the connection object will be passed ConnectionMessage() and ConnectionError() calls when it receives an incoming message or an error in the connection.
If a non-object is returned then the new connection will be disconnected.
|
ConnectionQueuedToSend
Returns the number of bytes queued to be send out to a connection.
This returns the number of bytes queued up to be sent to a connection. It does not includes shared data, such as the dowload-on-demand files.
You can use this to ensure that a user isn't intetionally creating a backlog on their side and trying to crash the server.
Parameter Name
|
Description
|
ConnectionIdent
|
Connection number to get info about.
|
Return value description
|
Returns the number of bytes queued up to be sent to out to the connection. This does NOT include data from files to be uploaded to the client as requested.
|
ConnectionRenderCacheSend
Sends a cached render or TTS .wav to the player's computer.
This sends a cached render of TTS .wav file to the player's computer.
It's used by MMLSpeak() and MMLSpeakNarrator() to pre-send cached TTS to the player's computer so it speaks right away.
Parameter Name
|
Description
|
ConnectionIdent
|
Connection number to get info about.
|
MMLString
|
MML string that names the render/TTS.
|
Return value description
|
Returns the quality of the data sent, from 0+.
If this failed, returns -1.
|
ConnectionSendFunc
Sends a message to the user.
This sends a message to the user.
NOTE: Use the ConnectionSend() method instead of ConnectionSendFunc().
Parameter Name
|
Description
|
ConnectionIdent
|
Connection number to send to.
|
MessageQueue
|
Pass true to queue this message up in the audio queue, so that if it's a message for more audio or graphics, it won't be heard/shown until it's turn in the queue.
If false then play this audio (or show the image) right away.
|
Message
|
Message to send. This is either a resource, or string that's wrapped up in MML tags to look like a resource.
|
Return value description
|
True if the message was sent, false if it failed.
|
ConnectionSendVoiceChatFunc
Sends a voice chat message to the user.
This sends a voice chat message to the user.
NOTE: Use the ConnectionSendVoiceChat() method instead of ConnectionSendVoiceChatFunc().
Parameter Name
|
Description
|
ConnectionIdent
|
Connection number to send to.
|
MMLString
|
MML string to send, from MMLSpeakObjectVoiceChat().
|
VoiceChatBianry
|
Binary data of voice chat, from the connection's ConnectionVoiceChat() method.
|
Garble
|
If TRUE then garble the speech to simulate the characters not understanding one another.
|
Effect
|
0 for no effect. 1 for whisper.
|
Return value description
|
True if the message was sent, false if it failed.
|
Share with your friends: |