def main(argv):  # pragma: no cover
    ip = "127.0.0.1"
    port = 5683
    try:
        opts, args = getopt.getopt(argv, "hi:p:", ["ip=", "port="])
    except getopt.GetoptError:
        usage()
        sys.exit(2)
    for opt, arg in opts:
        if opt == '-h':
            usage()
            sys.exit()
        elif opt in ("-i", "--ip"):
            ip = arg
        elif opt in ("-p", "--port"):
            port = int(arg)

    server = CoAPServerPlugTest(ip, port)
    try:
        server.listen(10)
    except __HOLE__:
        print "Server Shutdown"
        server.close()
        print "Exiting..."
dataset/ETHPy150Open Tanganelli/CoAPthon/plugtest_coapserver.py/main