Search found 22 matches

by balasourav
21 Aug 2020, 07:22
Forum: SFS2X Questions
Topic: Custom Logging Best Practice
Replies: 4
Views: 6808

Re: Custom Logging Best Practice

Lapo wrote:Create a logger object in each class that requires it.

Cheers


Done Lapo Great Response. :D
by balasourav
03 Aug 2020, 17:39
Forum: SFS2X Questions
Topic: Custom Logging Best Practice
Replies: 4
Views: 6808

Re: Custom Logging Best Practice

I don't like the global static log object for two reasons: 1- logging is synchronized 2- one of the fields in the log data is the class that generated the message. With the global approach it will always report the same class Cheers Thanks For Your Reply Lapo. Ok. Please tell what can i do?. How to...
by balasourav
03 Aug 2020, 11:56
Forum: SFS2X Questions
Topic: Custom Logging Best Practice
Replies: 4
Views: 6808

Custom Logging Best Practice

I want a custom logs for my project, so i use the link to configure customs logs - Link - https://smartfoxserver.com/blog/custom-logging-for-sfs2x-extensions/ Step 1 - i import external jar slf4j.api-1.7.5.jar. (That is not mentioned in your document) And Do like in your Document. Step 2 - I don't w...
by balasourav
03 Aug 2020, 05:56
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

Lapo wrote:I would not rely on this when there's a disconnection, because the references are getting removed.
I would use the suggestion I posted earlier, with the setProperty/getProperty

Cheers

Sorry For the inconvenience lapo. I use the above one. Am a beginner that's why i ask Like that...
by balasourav
24 Jul 2020, 07:15
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

Lapo wrote:
For example:

Code: Select all

user.setProperty("lastRoom", Room.getId());

which can be retrieved later with:

Code: Select all

int roomId = user.getProperty("lastRoom");


Cheers


Thank you so much lapo. I need this Exactly. In my game a user can join multiple room. at the same time.
by balasourav
23 Jul 2020, 18:10
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

2. The Below code only contains single room details or it contains all ROOMS joined by user? List<Room> joinedRooms = event.getParameter(SFSEventParam.JOINED_ROOMS); All of the Rooms joined by the User. Thanks Lapo. But I need Last Joined Room Only And its Details. At the time of disconnection I ne...
by balasourav
23 Jul 2020, 09:17
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

The code above will give you back the list of Rooms in which the User was joined. From there you can extract the Room(s) and access their relative variables. Cheers Thank You So much Lapo. 1. Please check the below code is correct or not? Or any-other ways there to split List? @SuppressWarnings(&qu...
by balasourav
23 Jul 2020, 08:19
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

Lapo wrote:

Code: Select all

List<Room> joinedRooms = event.getParameter(SFSEventParam.JOINED_ROOMS);



Thanks For You Reply Lapo. If i use the above code, can i get room variables?
by balasourav
23 Jul 2020, 07:28
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

Re: User Disconnection Cant Get Room and Room Variables

Lapo wrote:Hi,
is the Java code (that you have posted) part of a Room Extension?

Thanks


Yes its a java code and That is zone Extension.
by balasourav
22 Jul 2020, 23:14
Forum: SFS2X Questions
Topic: User Disconnection Cant Get Room and Room Variables
Replies: 13
Views: 12528

User Disconnection Cant Get Room and Room Variables

This is my server side code in java :- if(event.getType() == SFSEventType.USER_DISCONNECT) { trace("User Disconnect EventCapture for User 1:"+event.getParameter(SFSEventParam.USER)); User u; Room r; u = (User) event.getParameter(SFSEventParam.USER); trace("Connection Lost User Name 1:...
by balasourav
29 Aug 2019, 13:41
Forum: SFS2X Questions
Topic: Add SSL Certificate
Replies: 1
Views: 8678

Add SSL Certificate

I need to add SSL certificate In SFS admin Panel. Please Guide Me What setting i need to done in SFS admin Panel. Please Explain Step By Step.
by balasourav
28 Aug 2019, 13:48
Forum: SFS2X Questions
Topic: Session Reconnection failure
Replies: 5
Views: 6917

Re: Session Reconnection failure

I clearly Explain My scenario -
I have 2 wifi(wifi 1 and wifi 2) connection, Both of them in auto connect. if in-between game wifi 1 is disconnected wifi 2 automatically connected, at this time session re connection failure error is occur. Any possible ways there to solve this type of error ?
by balasourav
27 Aug 2019, 08:28
Forum: SFS2X Questions
Topic: Session Reconnection failure
Replies: 5
Views: 6917

Session Reconnection failure

27 Aug 2019 | 13:53:31,212 | WARN | SFSWorker:Sys:1 | controllers.v290.SystemReqController | | com.smartfoxserver.bitswarm.exceptions.SessionReconnectionException: Session Reconnection failure. Time expired for Session: { Id: 49, Type: DEFAULT, Logged: Yes, IP: 127.0.0.1:37424 } com.smartfoxserver....
by balasourav
22 Aug 2019, 05:59
Forum: SFS2X Questions
Topic: No operations allowed after statement closed
Replies: 3
Views: 5690

Re: No operations allowed after statement closed

My Error Is : No operations allowed after statement closed I ill explain The exact scenario, user 1 and user 2 playing the game. At the time of result send, My side insert data into database. 1st user 1 enter into insert function and try to insert at the same time user 2 try to access the same inser...
by balasourav
21 Aug 2019, 14:22
Forum: SFS2X Questions
Topic: No operations allowed after statement closed
Replies: 3
Views: 5690

No operations allowed after statement closed

My game is multiplayer game, I use a default db connection for all user and close it in function end at that time i got this error. I don't know how to handle DB manager, am a beginner for sfs. This is timer based game i need to send result at 0 second. At that time i got this error. if single playe...

Go to advanced search