Server Help

Non-Subspace Related Coding - <py> to java applet

BDwinsAlt - Tue Mar 20, 2007 1:06 am
Post subject: <py> to java applet
Can someone please help me turn this client into a java applet. I have the server/client all written in python. I want the server to stay in python. I think the client is all you need to recreate the python client into a java applet.

I'm hopping for a text field with IP:Port and Password then the options:
1. Start ASSS
2. Shutdown ASSS
3. Restart ASSS

When 1 is selected it needs to send "1" to the server and so on.

If you need more details let me know.

Note: the only thing being sent to the server is the password, then it sends a valid or invaild login message, and then it sends back "1", '2", or "3"

Here is my client code:
Code: Show/Hide

#----------------------------------------
# Name:   asssclient.py
# Date:   March 18, 2006
# Author: BDwinsAlt
#----------------------------------------

import socket

print 'ASSS Admin 1.0 by BDwinsAlt'

HOST = "MyCoolZone.com"
PORT = 1337
password = ""   # define your password here if you don't want to type it in each time.

try:
    socket1 = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
    socket1.connect ( ( HOST, PORT ) )
    if password != "":
        socket1.send(password)
    else:
        socket1.send(raw_input("Password> "))
    print socket1.recv(128)
    socket1.send(raw_input("> "))
    socket1.close()

except:
    print 'Connection error. Please check the IP and Port. The server may be offline.'
    socket1.close()


Ignore the things you don't need for the GUI, like the predefined password.

Thanks icon_biggrin.gif

Edit: I did it by myself. Java client is done.
Animate Dreams - Wed Mar 21, 2007 11:52 am
Post subject:
Where's the source to the server and Java client?
BDwinsAlt - Wed Mar 21, 2007 5:56 pm
Post subject:
I'm not releasing it now. When I do I'll put it in the custom projects.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group