[SOLVED] MAX_CLIENTS in sendUPC

All Union Platform questions, comments, feature requests, and bug reports.

MAX_CLIENTS in sendUPC  

Postby bartjen » Tue 18 Sep 2012 05:48

Using the chat example; http://www.unionplatform.com/?page_id=2247

One thing I can't figure out is;
How can I set the max_clients attribute in the function readyListener (e) for the room that will be created?

I assume that there must be a value behind roomID? (_MAX_CLIENTS: int (-1 for no max))
msgManager.sendUPC(UPC.CREATE_ROOM, roomID);

u24 in: http://www.unionplatform.com/specs/upc/upc-194.html

Thanks!
bartjen
 
Posts: 5
Joined: Mon 17 Sep 2012 02:52
Location: Netherlands

Re: MAX_CLIENTS in sendUPC

Postby bartjen » Wed 26 Sep 2012 04:29

Someone who can help my with setting the MAX_CLIENTS attribute in java?
I am using my own version of the example chat script.

Thanks!
bartjen
 
Posts: 5
Joined: Mon 17 Sep 2012 02:52
Location: Netherlands

Re: MAX_CLIENTS in sendUPC

Postby colin » Fri 16 Nov 2012 02:07

hi bartjen,
in OrbiterMicro, Union's lightweight JavaScript framework (note: not Java), here's the code to set _MAX_CLIENTS to 5:

Code: Select all
var roomID = "YourRoomID";
orbiter.getMessageManager().sendUPC(net.user1.orbiter.UPC.CREATE_ROOM, roomID, "_MAX_CLIENTS|5");


in Orbiter, Union's full featured JavaScript framework, here's the equivalent code:
Code: Select all
var roomID = "YourRoomID";
var roomSettings = new net.user1.orbiter.RoomSettings();
roomSettings.maxClients = 5;
   
var chatRoom1 = orbiter.getRoomManager().createRoom(roomID, roomSettings);



and in Reactor, Union's ActionScript (Flash) framework, here's the code:

Code: Select all
var roomID:String = "YourRoomID";
var roomSettings:RoomSettings = new RoomSettings();
roomSettings.maxClients = 5;
   
var chatRoom1:Room = reactor.getRoomManager().createRoom(roomID, roomSettings);


in all cases, here's the UPC message that's generated and transmitted to Union Server:

Code: Select all
<U><M>u24</M><L><A>chatRoomMaxClientTest</A><A>_MAX_CLIENTS|5</A></L></U>


colin
colin
 
Posts: 232
Joined: Mon 17 Oct 2011 18:47


Return to Union Platform

Online

Users browsing this forum: No registered users and 1 guest