Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: Andyfritter/SomethingChat
base: 40473756d5
...
head fork: Andyfritter/SomethingChat
compare: e4f19c3cef
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 20, 2012
Andyfritter ADDED SOME SHIT e4f19c3
Showing with 8 additions and 4 deletions.
  1. +8 −4 client.py
12 client.py
View
@@ -4,12 +4,16 @@
class Client():
def __init__(self):
self.name = raw_input('Enter Name: ')
- self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.s.connect((HOST, PORT))
- data = s.recv(1024)
- self.s.close()
+ try: self.host = HOST
+ except: self.host = raw_input('Enter Host\'s IP: ')
+ self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.s.connect((self.host, PORT))
+ data = s.recv(1024)
+ self.s.close()
print repr(data)
def say(self, msg):
self.s.sendall(self.name + ': ' + msg)
+
+

No commit comments for this range

Something went wrong with that request. Please try again.