Commit 4a1daea4 authored by opelhoward's avatar opelhoward
Browse files

edit document

parent ae521a9e
No preview for this file type
This diff is collapsed.
......@@ -281,7 +281,6 @@ class ConnectionHandler:
for offer in offer_list:
count += 1
for my_offer in my_offers:
print(str(offer.offer_token)+' '+str(my_offer.id))
if str(offer.offer_token) == str(my_offer.id):
delete_list.append(count)
......@@ -498,9 +497,10 @@ class FindOfferThread(Thread):
try:
response = json.loads(data.decode('utf-8'))
server_offer_list = response.get('offers',[])
print('read offering from ',self._host,':',self._port)
print(response)
Market.add(self._item, server_offer_list, self._host, self._port)
self._result = server_offer_list
print('read offering from ',self._host,':',self._port)
print(self._result)
except ValueError as ve:
return
......
......@@ -26,7 +26,7 @@ class Server:
def run(self):
# bikin socket object
socket = Socket.socket()
host = Socket.gethostname()
host = '167.205.71.31'#Socket.gethostname()
port = self._port
try:
......@@ -40,7 +40,7 @@ class Server:
print('Socket listen at',host,':',port)
# get server ip
self._ip = Socket.gethostbyname(host)
self._ip = '167.205.71.31'#Socket.gethostbyname(host)
print('Current server ip = ',self._ip)
#connect ke tracker
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment