summaryrefslogblamecommitdiffstats
path: root/notFinishedCode/mainController.py
blob: be929f09272d2135f40ce047d7c3791d5d7f263d (plain) (tree)




























                                                           
import ClientClass 
import DBC
from time import sleep

#MAIN PART
user = 'root'
passw = 'mysqlpassword'
host = 'localhost'
dbname = 'gsmselftesting'
 
database = DBC.DBMySQLConnection(user, passw, host, dbname)
x = ClientClass.Connection('localhost',50008)


print x.connect()
x.sendData('HELLO HANDLER')
print x.receiveData()
x.sendData('CALLER|NUMBER')
print x.receiveData()

sleep(4)
print 'sta sam dobio'
x.sendData('RECEIV|READY')
print x.receiveData()
x.sendData('TERMINATE')
print x.receiveData()

x.closeConnection()