Server Help

ASSS Custom Projects - <py> Cellphone stats

BDwinsAlt - 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?
Mine GO BOOM - 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.
BDwinsAlt - 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.
Mine GO BOOM - 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.)
BDwinsAlt - 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. new_let_it_all_out.gif
Dr Brain - Sun Jan 14, 2007 8:01 pm
Post subject:
This could be done in under an hour with a C module.
BDwinsAlt - 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.
Smong - 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.
Doc Flabby - 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
BDwinsAlt - 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.
Doc Flabby - Mon Jan 15, 2007 1:39 pm
Post subject:
You will need the j2me sdk

The sdk comes with gui information. and a cell phone simulator to test your program in.

http://java.sun.com/javame/downloads/index.jsp
BDwinsAlt - 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.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group