Websocket listener

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

moonlife
Posts: 45
Joined: 26 Sep 2016, 08:22

Websocket listener

Postby moonlife » 19 Mar 2021, 15:44

Hi All,

I wonder why user can see other user's incoming websocket.

I mean. I'm at x room. and some user (who is not my friend) joined the lobby.

Then I can see this action on chrome WS as follow

00000000: 8000 9e12 0003 0001 7012 0002 0001 7204 ........p.....r.
00000001: 0000 0001 0001 7511 0005 0400 0000 0608 ......u.........
00000002: 0024 4338 4636 3130 3835 2d46 4136 302d .$C8F61085-FA60-
00000003: 3441 4136 2d42 3935 342d 3838 3546 3237 4AA6-B954-885F27
00000004: 4145 4639 3035 0300 0003 0000 1100 0311 AEF905..........
00000005: 0004 0800 0476 7069 6402 0204 0000 04d7 .....vpid.......
00000006: 0100 1100 0408 000a 7670 7573 6572 6e61 ........vpuserna
00000007: 6d65 0204 0800 0a47 7565 7374 3735 3239 me.....Guest7529
00000008: 3201 0011 0004 0800 0676 706d 6173 6102 2........vpmasa.
00000009: 0408 0000 0100 0001 6103 03e8 0001 6302 ........a.....c.
0000000a: 00


What should I do to hide this on WS.

Thanks.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Websocket listener

Postby Lapo » 19 Mar 2021, 16:16

Hi,
it looks like your client is sending the network debug data to the browser's console. Turning that off would save performance and avoid showing the network dump. Check this connection example here:
http://docs2x.smartfoxserver.com/api-do ... rtFox.html
and make sure the debug flag is set to false.

Also, if another User joins the same Room you are in an event will be sent to your client. This is the default behavior in SFS2X Rooms, if you want to inhibit the notification you need to configure the Room differently when you create it. You can check the docs for specific events that can be turned off when creating the Room.

Finally if what bothers you is that the traffic can reveal data from other players through broadcast events, you should turn on encryption by deploying an SSL certificate in SFS2X.
http://docs2x.smartfoxserver.com/Gettin ... yptography

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 15 guests