Skip to content

Commit

Permalink
Don’t hard-code ip/port in test client
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouke committed Apr 12, 2017
1 parent 66bd9ad commit d628760
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test-client.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env python

import socket
import sys

if(len(sys.argv) != 3):
print("expected 2 arguments")
sys.exit(-1)

TCP_IP = '127.0.0.1'
TCP_PORT = 8000
TCP_IP = sys.argv[1]
TCP_PORT = int(sys.argv[2])
BUFFER_SIZE = 1024
MESSAGE = """PUT /characteristics HTTP/1.1\r\nContent-Length: 121\r\n\r\n{
"characteristics": [
Expand Down

0 comments on commit d628760

Please sign in to comment.