Author |
Message |
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Sun Jan 14, 2007 2:19 pm Post subject: <py> Cellphone stats |
|
|
|
|
I'm working on something in Python and Java. I know how to do a client/server in python and all. I have a problem though. I can't attach the python server to ASSS because it is using a while loop to listen for connections, so ASSS stays on that while loop and won't continue to do what ASSS does.
I need to be able to get a seperate python process to access things from a normal ASSS module or directly from ASSS. What I am trying to do is send things like PlayerCount and Uptime to my cellphone.
I can do the Java client easily, I have everything on the python server working except I can't get a player count since it isn't attached to ASSS.
What can I do?
I was thinking if all else fails store the info to a file and access that each time. What do you think? |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Sun Jan 14, 2007 2:43 pm Post subject: |
|
|
|
|
Non-blocking sockets combined with a timer. Every second or so, check for data sent to/from your client. |
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Sun Jan 14, 2007 2:48 pm Post subject: |
|
|
|
|
Ok thanks. I have a python client for now, what I did for now until I try out what MGB said is: A module for ASSS (writes stats to a file) A server and client in python to send/recieve data.
Now my next project is the Java side of it. I will have to make one in a GUI with JCreator LE, compile it, make it a jar, use a jar to wad convertor and load it to my phone. Wish me luck.
EDIT: The java client works on my pc but says invalid file on my phone. I'll have to find an example of how a normal app looks. |
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Sun Jan 14, 2007 4:23 pm Post subject: |
|
|
|
|
BDwinsAlt wrote: | (writes stats to a file) |
Ugh. Writing and reading to a file for temporary information? Why not use shared memory instead? (Note: POSH is just what I found off searching for a python module to do this, I've never used it.) |
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Sun Jan 14, 2007 4:34 pm Post subject: |
|
|
|
|
Hmm right now my issue is I can't seem to get my cellphone to accept the file as vaild. I need some kind of WAP tools. I've looked around without any luck.
It works fine on my pc.
I have a Motorola V190 if that helps.
I'll try all of your suggestions after I can get it working on my phone. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Jan 14, 2007 8:01 pm Post subject: |
|
|
|
|
This could be done in under an hour with a C module. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Sun Jan 14, 2007 9:03 pm Post subject: |
|
|
|
|
I have everything but the java client working on my phone. I need to import an MIDlet thing to get it running properly. In the meantime wish me luck. |
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Mon Jan 15, 2007 4:30 am Post subject: |
|
|
|
|
You probably want some special SDK for your phone, since it will have some differences from normal desktop Java. Reduced number of classes and special classes to handle UI and input for example. _________________ ss news |
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Mon Jan 15, 2007 7:07 am Post subject: |
|
|
|
|
most cell phones use J2ME for java.
You can get a j2me plugin for netbeans (and eclipse probabbly)
Alot of cell phone providers block TCP and UDP. I tried to create a chat client for my phone but it failed because the provider only allows HTTP access i have to pay an extra 40/month for that "upgrade" and then there was still extortionate data costs on top of that (so i declined lol)
i think its cos they parnoid about VOIP _________________ Rediscover online gaming. Get Subspace | STF The future...prehaps |
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Mon Jan 15, 2007 11:38 am Post subject: |
|
|
|
|
I could put it on a web port if I had to.
The server has multiple ips, I am testing locally though.
I found the imports I need but I dont know where to put them.
Also I'm not too sure about how the GUI has to be. |
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Mon Jan 15, 2007 5:57 pm Post subject: |
|
|
|
|
I had the tools I just forgot I downloaded them.
I got an app working on my cellphone, it will only connect to my pc if I run it through an emu.
It won't show me what the socket is sending. I think it is having trouble reading the socket, everything else works. I am using the Network I(socket) example. |
|
Back to top |
|
|
|