Protocols/MSNP/Activities/Sandbox

From NINA Wiki
Revision as of 05:30, 19 August 2023 by Animadoria (talk | contribs) (Created page with "<!-- Original thread: https://social.msdn.microsoft.com/Forums/azure/en-US/e1cd2d00-15b0-4177-9ae6-357b377d7506/sandbox-for-testing-?forum=wlmessengerdev Archived here for po...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The user "TheBlasphemer" posted, on the Social MSDN website, an Activity Sandbox tester.

Download

You can get the Sandbox compressed file here: https://storage.nina.chat/nina/wiki/msnp/Sandbox.rar

How It Works

To make it work, replace "window.external" with the following method:

function GetExternal() {
    if (typeof(window.external.Channel) != "undefined") {
        return window.external;
    } else {
        return window.parent.control.GetExternal(window.name);
    }	
}

What it does is check if we have a "window.external.Channel" type. If we do (aka is not "undefined"), use that window.external, if not, we are using the Sandbox, and use the faux-Sandbox one.

Notes

You should really 'really' use Internet Explorer to test this. The Messenger ieframe emulates IE7-9, depending on the meta tags, and you should use that too.

Original Post

Hi,
I didn't want to send out xml files, bugger my friends to play, or do polygamy, so I decided to create a Sandbox for multiplayer testing :)
Currently it supports almost everything, except filetransfer, and the _NewEnum method of Users (how does it work anyway?)
To test your app in the sandbox youu will have to do some minor modifications:
First, do a simple search&replace replacing "window.external" with "GetExternal()"
Next, add the function GetExternal to your script, steal it from one of the added test-games.
Lastly, remove any unnecesarry headers, like doctype and meta stuff, somehow this f*cks up the script :P

Currently, all I've tested is a modified tictactoe, and joosts test (which is slightly bugged ;))

You can get the sandbox at: http://files.stuffplug.com/Sandbox.rar

Things I still want to implement:
- Forcing 2packets/second
- measuring max datatraffic
- add packet delay

If you use the sandbox, please give credit where credit is due ;)
and I would really appreciate some feedback....

Bye,
TB