# Path: stator/http.py
#     UNICODE_TYPE = unicode
#     UNICODE_TYPE = str
# class CantBindAddress(Exception):
# class HttpRequest(Socket):
# class Http(Socket):
#     def __init__(self, id, dic):
#     def reply(self, status, headers, body):
#     def parse_message(self, input):
#     def __init__(self, host, port):
# 
# Path: stator/loop.py
#     INT_TYPES = (int, long)
#     INT_TYPES = int
# TABLE = SocketTable()
# class Socket(object):
# class SocketTable(object):
#     def __init__(self, id):
#     def close(self):
#     def parse_message(self, input):
#     def __repr__(self):
#     def __init__(self):
#     def add(self, item):
#     def get(self, id):
#     def remove(self, id):
# def parse_message(sock_id, buf, buf_len):
# def no_message():
# def blocking_io():
# def events():


import hiredis
import redis
import random
from time import sleep, time
from stator import http, loop
from time import clock


def main():
    sock = http.Http('127.0.0.1', 3000)
    #rconn = redis.Redis(unix_socket_path="/work/target/redis.sock")
    rconn = redis.Redis(port=3001)
    for req in loop.events():

# Path: stator/http.py
#     UNICODE_TYPE = unicode
#     UNICODE_TYPE = str
# class CantBindAddress(Exception):
# class HttpRequest(Socket):
# class Http(Socket):
#     def __init__(self, id, dic):
#     def reply(self, status, headers, body):
#     def parse_message(self, input):
#     def __init__(self, host, port):
# 
# Path: stator/loop.py
#     INT_TYPES = (int, long)
#     INT_TYPES = int
# TABLE = SocketTable()
# class Socket(object):
# class SocketTable(object):
#     def __init__(self, id):
#     def close(self):
#     def parse_message(self, input):
#     def __repr__(self):
#     def __init__(self):
#     def add(self, item):
#     def get(self, id):
#     def remove(self, id):
# def parse_message(sock_id, buf, buf_len):
# def no_message():
# def blocking_io():
# def events():


# Path: examples/http_sync_redis.py
import hiredis
import redis
import random
from time import sleep, time
from stator import http, loop
from time import clock



def main():
    sock = http.Http('127.0.0.1', 3000)
    #rconn = redis.Redis(unix_socket_path="/work/target/redis.sock")
    rconn = redis.Redis(port=3001)
    for req in loop.events():

        n = rconn.incr("hello-world-counter")