Create a User instance by a Java Extesion

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

eyal
Posts: 35
Joined: 29 Nov 2009, 11:18

Create a User instance by a Java Extesion

Postby eyal » 06 Jan 2010, 13:34

Hi,
In my application, a java extension is responsible for create a room and add a new User immediately after the craetion.
the Java extension recieves roomName, userId, userIp, userPort and zoneName.
while in room's creation, the extion try to create SocketChannel, using the following:

Code: Select all

socketChannel = SocketChannel.open(new InetSocketAddress(userURL, userPort));

but if failed with connection refused / timeout.
How it can be solved?
How can I create a User which represnents a remote user?
Does SmartFoxClient implements ServerChannel?

Thanks for you patient,
Eyal.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 08 Jan 2010, 07:53

What you need to do is using an NPC which can be created via the ExtensionHelper.createNPC(...) method.

Additionally, since version 1.6.6 we provide an example with source code that shows the NPC creation/management.
You find it under {your-sfs-dir}/Examples/NPCExample/
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 21 guests