Search found 191 matches

by tchen
08 Mar 2011, 16:38
Forum: SFS2X Questions
Topic: Which thread is responsible for sending msg?
Replies: 4
Views: 2053

http://docs2x.smartfoxserver.com/Advanc ... hreadPools

1. ExtensionController is probably what you're looking for. Although I have a sneaking suspicion that the lower-level socket reader/writer layer has its own thread pool which we can't touch.

2. see doc

3. see doc
by tchen
07 Mar 2011, 21:18
Forum: SFS2X C# API
Topic: Writing data to mysql
Replies: 10
Views: 3952

appels wrote:byte[] ba = (byte[]) dt.GetByteArray("levelXmlBytes");

does anyone know how i can convert my received sfs byte array back to the original xml ?


It should be one of the String constructors. (Java)

or

System.Text.Encoding.UTF8.GetString (C#)
by tchen
07 Mar 2011, 19:38
Forum: SFS2X Questions
Topic: Custom room events?
Replies: 17
Views: 5994

As Lapo said, use the task scheduler. Let's break down the problem into two discrete steps: 1. User triggers something, say a magic button that makes the things in the room go off periodically for the next 30 seconds. Use handleClientRequest to respond to the 'trigger' extension message. In it, grab...
by tchen
05 Mar 2011, 21:51
Forum: SFS2X Questions
Topic: DBmanager connection lost
Replies: 2
Views: 1635

Close all of your db objects. Connection conn = null; PreparedStatement sql = null; ResultSet result = null; try { conn = main.dbManager.getConnection(); sql = conn.prepareStatement("SELECT * FROM ..."); result = sql.executeQuery(); ISFSArray row = SFSArray.new...
by tchen
28 Feb 2011, 17:48
Forum: SFS2X Questions
Topic: getting heightdata from unity to sfs java
Replies: 7
Views: 2982

Look up the format specification for OBJ files and parse it in yourself. Format wise, it doesn't get any easier than obj.
by tchen
27 Feb 2011, 18:14
Forum: SFS2X Questions
Topic: getting heightdata from unity to sfs java
Replies: 7
Views: 2982

Things like that you'd want to make as an export process from Unity editor to your own personal file format which you read in on the server side.
by tchen
26 Feb 2011, 16:49
Forum: SFS2X Questions
Topic: SmartFoxServer versions and .NET
Replies: 10
Views: 2983

Technically Java is the only supported language and all documentation is based around that. Scala, because of how it works, just piggybacks on the same JVM and has 1-1 interop so it can do exactly the same. Normally we don't talk about it here, but I just mentioned it because I know how frustratingl...
by tchen
26 Feb 2011, 12:35
Forum: SFS2X Questions
Topic: SmartFoxServer versions and .NET
Replies: 10
Views: 2983

I can vouch that Scala also works too. I'm using it alongside Java. I must say, it feels even closer to the more recent C# versions with anon functions and the like so that's also an option for you.

And haha, I'm down the food chain with Netbeans :oops:
by tchen
25 Feb 2011, 23:22
Forum: SFS2X Questions
Topic: Tracing from custom class.
Replies: 3
Views: 1769

What you have works, but it's opening a Pandora's box - especially once you start having state in that static object. Log4j is a relatively common logger used in Java and its also what SFS is using directly under the hood whenever you call SFSExtension.trace. You also get the added benefit of not ha...
by tchen
25 Feb 2011, 23:13
Forum: SFS2X Questions
Topic: SmartFoxServer versions and .NET
Replies: 10
Views: 2983

It might have slipped Thomas's mind, which is understandable since he's worked so hard on the C# client, but it should be mentioned that the server-side is still Java.

That said, it's not too far of a jump from C# to Java. You'll miss certain things, but I think you'll be able to pick it up quick.
by tchen
24 Feb 2011, 19:44
Forum: SFS2X Questions
Topic: Generating Md5 Signature of SFSObject
Replies: 3
Views: 1423

It's not built-in, but you could always try putting in all the signed stuff inside a POJO and deal with the ordering that way.

http://docs2x.smartfoxserver.com/Advanc ... ialization
by tchen
24 Feb 2011, 06:12
Forum: SFS2X Questions
Topic: UDP vs TCP
Replies: 9
Views: 3606

So if we put that into context... In a real-time game, say a player fires an arrow. In TCP if the packet takes a long route, the game will pause (lag)? In UDP the packet would be dropped and so other players would not see the arrow being fired. Correct? Yes, and that's why iceshaft wants to put tra...
by tchen
24 Feb 2011, 06:09
Forum: SFS2X Questions
Topic: Extension Filters
Replies: 1
Views: 1081

It looks and smells like threadpools throughout. http://docs2x.smartfoxserver.com/AdvancedTopics/advanced-extensions#threadModel SystemController seems to have its own too. Regarding the thread local pattern, the IDBManager.getConnection actually returns a pooled JDBC connection so the sessions aren...
by tchen
24 Feb 2011, 05:46
Forum: SFS2X Questions
Topic: UDP vs TCP
Replies: 9
Views: 3606

Stupid question here: What are the benefits of using UDP over TCP? Traffic flow. Assuming you time code your packets, we're going to ignore out of order packets. So it comes down to whether you want the stream to suddenly halt/wait if one of the packets takes a longer route. UDP just keeps going an...
by tchen
24 Feb 2011, 05:37
Forum: SFS2X Questions
Topic: Tracing from custom class.
Replies: 3
Views: 1769

1) Include the library log4j-1.2.15.jar 2) Then edit log4j.properties and include a line for your namespace log4j.category.com.mycompany=TRACE,consoleAppender,fileAppender 3) Add import org.apache.log4j.Logger to your code 4) When logging, use Logger.getLogger(MyClass.class).trace("Yadda Yadda&...

Go to advanced search