Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
<py> Cellphone stats

 
Post new topic   Reply to topic Printable version
 View previous topic  <c> vehicles Post :: Post Spree module  View next topic  
Author Message
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sun Jan 14, 2007 2:19 pm    Post subject: <py> Cellphone stats Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Sun Jan 14, 2007 2:43 pm    Post subject: Reply to topic Reply with quote

Non-blocking sockets combined with a timer. Every second or so, check for data sent to/from your client.
Back to top
View users profile Send private message Add User to Ignore List Send email
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sun Jan 14, 2007 2:48 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Sun Jan 14, 2007 4:23 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sun Jan 14, 2007 4:34 pm    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun Jan 14, 2007 8:01 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sun Jan 14, 2007 9:03 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Jan 15, 2007 4:30 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Mon Jan 15, 2007 7:07 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Jan 15, 2007 11:38 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Mon Jan 15, 2007 1:39 pm    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Jan 15, 2007 5:57 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 530 page(s) served in previous 5 minutes.

phpBB Created this page in 0.470297 seconds : 37 queries executed (93.2%): GZIP compression disabled