rjgtav, thanks for your reply!
yes i've been restarting the server instead of reloading the extension every time. i attempted to send a json object but failed to recieved the message, the only thing the server gets in debug log thus far has been "SendObject".
here is my json code hopefully everything is right
on server:
Code: Select all
@Override
public void handleRequest(String cmd, org.json.JSONObject jso, User u, int fromRoom)
{
System.out.println("Received JSON object!");
}
on client:
Code: Select all
SmartFoxClient client = SmartFox.Connection;
//client.SendObject(data);
String[] d = {"Yes", "NO!"};
client.SendXtMessage("mobControl", "SpawnObject", d, SmartFoxClient.XTMSG_TYPE_JSON);
return;
i just sent the string array because i wasnt too sure if the parameters affect if the function fires or not..
im using smartfox Pro 1.6.6. with jdk-6u31-windows-i586.exe and eclipse as my java IDE
so i was thinking it may have been because i had jdk7 installed, so i uninstalled all my java versions and just put the above release of java SE 6. im kind of new to java so could this possibly be a compiler setting? or something of that nature?
my next test is going to be a new project i suppose, maybe reinstall java and smartfox? could i be missing a lib / dll or whatever the java equivalent is?
*edit*
i also added a new class "mobControl" as the room extension, instead of trying to do this all in the zone extension for login.
*edit2*
also here i my server log, maybe something is missing from the chain of events that should be taking place before i can send/receive?
Code: Select all
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
| |
| ...::: SmartFoxServer :::... |
| Multiplayer Socket Server |
| version 1.6.6 |
| --- |
| (c) 2004 - 2009 gotoAndPlay() |
| www.smartfoxserver.com |
| www.gotoandplay.it |
| |
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
::::::::::: { BlueBox INITED } ::::::::::::
: :
: Version 1.0.5 -- (c) 2008 gotoAndPlay() :
: :
:::::::::::::::::::::::::::::::::::::::::::
22:23:09.969 - [ INFO ] > Starting h2 engine...
--- [ System Info ] ------------------------------------------
System CPU(s): 4
VM Max memory: 517 MB
os.name: Windows Vista
os.arch: x86
os.version: 6.1
java.version: 1.6.0_13
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 11.3-b02
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) Server VM
--- [ Network Cards ] -----------------------------------------
Card:Software Loopback Interface 1
-> 0:0:0:0:0:0:0:1
-> 127.0.0.1
Card:WAN Miniport (SSTP)
Card:WAN Miniport (L2TP)
Card:WAN Miniport (PPTP)
Card:WAN Miniport (PPPOE)
Card:WAN Miniport (IPv6)
Card:WAN Miniport (Network Monitor)
Card:WAN Miniport (IP)
Card:RAS Async Adapter
Card:WAN Miniport (IKEv2)
Card:Realtek PCIe GBE Family Controller
-> fe80:0:0:0:44a0:93d6:d66b:20f4%11
-> 192.168.1.80
Card:Microsoft ISATAP Adapter
-> fe80:0:0:0:0:5efe:c0a8:150%12
Card:Teredo Tunneling Pseudo-Interface
-> 2001:0:4137:9e76:4b:12bc:b4ee:93c7
-> fe80:0:0:0:4b:12bc:b4ee:93c7%13
Card:Realtek PCIe GBE Family Controller-QoS Packet Scheduler-0000
Card:Realtek PCIe GBE Family Controller-WFP LightWeight Filter-0000
Card:WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000
Card:WAN Miniport (IP)-QoS Packet Scheduler-0000
Card:WAN Miniport (IPv6)-QoS Packet Scheduler-0000
--- [ Licence Loaded ] ------------------------------------
License Type -> PRO
License Owner -> --== Free Demo Licence ==--
Max. Clients -> 20
BlueBox Type -> Demo Version
--- [ Zones & Rooms ] -------------------------------------
22:23:11.181 - [ INFO ] > Default Buddy List Persister <INITED>
22:23:11.182 - [ WARNING ] > Can't initialize BuddyListManager with passed list-
size of: 0
DB Manager Activated ( org.gjt.mm.mysql.Driver )
Zone: theRPG
MainRoom (id: 1, max: 100, pass:N)
TheRPG (id: 2, max: 100, pass:N)
22:23:11.426 - [ INFO ] > Room Extension [ mobControl ] created!
-- == -- MOBCONTROL ONLINE -- == --
22:23:11.433 - [ INFO ] > Zone Extension [ rpgLogin ] created, for zone:theRPG
--- [ Server Starting ] ---------------------------------
Server address: All
Server port : 9339
22:23:11.451 - [ INFO ] > [TaskScheduler] ... started ::
22:23:11.452 - [ INFO ] > [BlueBoxHandler]... started ::
22:23:11.453 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
22:23:11.454 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
22:23:11.454 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
22:23:11.455 - [ INFO ] > [DeadChannelsPolicy: strict]
22:23:11.456 - [ INFO ] > Server is up and running!
Handle internal request
22:23:26.695 - [ INFO ] > { DATA IN } : <msg t='sys'><body action='verChk' r='0'
><ver v='154' /></body></msg>
22:23:38.953 - [ INFO ] > { DATA IN } : <msg t='sys'><body action='login' r='0'>
<login z='theRPG'><nick><![CDATA[testDummy]]></nick><pword><![CDATA[testDummy]]>
</pword></login></body></msg>
Handle internal request
user: testDummy has connected.
sending room list to:
22:23:39.352 - [ INFO ] > { DATA IN } : <msg t='sys'><body action='joinRoom' r='
-1'><room id='2' pwd='' spec='0' leave='0' old='-1' /></body></msg>
MOBCONTROL - Internal Event Object
Handle internal request
22:24:11.443 - [ INFO ] > Disconneting idle user: testDummy
MOBCONTROL - Internal Event Object
Handle internal request
also i reinstalled java jdk-6u31 and smartfox pro 1.6.6, didnt help :\