Skip to content

Commit ddb019a

Browse files
committed
deprecate getAvailableRooms()
1 parent f98cf3a commit ddb019a

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

example/openfl/Source/Main.hx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,6 @@ class Main extends Sprite {
2222
this.client = new Client("ws://localhost:2567");
2323
// this.client = new Client("wss://colyseus-examples.herokuapp.com");
2424

25-
// list available rooms for connection
26-
haxe.Timer.delay(function() {
27-
this.client.getAvailableRooms("state_handler", function(err, rooms) {
28-
if (err != null) {
29-
trace("ERROR! " + err);
30-
return;
31-
}
32-
33-
for (room in rooms) {
34-
trace("RoomAvailable:");
35-
trace("roomId: " + room.roomId);
36-
trace("clients: " + room.clients);
37-
trace("maxClients: " + room.maxClients);
38-
trace("metadata: " + room.metadata);
39-
}
40-
});
41-
}, 3000);
42-
4325
this.client.joinOrCreate("state_handler", [], State, function(err, room) {
4426
if (err != null) {
4527
trace("ERROR! " + err);

src/io/colyseus/Client.hx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ class Client {
7878
this.createMatchMakeRequest('reconnect', roomIdAndReconnectionToken[0], [ "reconnectionToken" => roomIdAndReconnectionToken[1] ], stateClass, callback);
7979
}
8080

81-
public function getAvailableRooms(roomName: String, callback: (HttpException, Array<RoomAvailable>)->Void) {
82-
this.http.get("matchmake/" + roomName, null, callback);
83-
}
84-
8581
@:generic
8682
public function consumeSeatReservation<T>(response: Dynamic, stateClass: Class<T>, callback: (HttpException, Room<T>)->Void) {
8783

0 commit comments

Comments
 (0)