Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing IP from localhost to that of the machine in the network #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Changing IP from localhost to that of the machine in the network #4

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 19, 2017

As the chat clients are intended to run on different systems, so the server would've to run on its machine's IP. Though I've changed the backup file as well (.py~), it could be deleted too.

Changed IP to that of machine in network so that the code can work on multiple systems.
Changed IP to that of machine in network so that the code can work on multiple systems.
@@ -3,8 +3,8 @@ import select
import sys

class Server:
def __init__(self):
self.host = ''
def __init__(self, ip):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to make changes here. ~py files are just the swaps. I think .gitignore is not working

@@ -217,9 +217,18 @@ def fileno(self):
def send(self, data):
self.socket.send(data)

class IP_add:
def getIP(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is not correct at the start of s.

Copy link
Author

@ghost ghost Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean s = socket.socket's start? I think the indentation is okay. It runs without any error.

# Create our server instance
s = Server()
s = Server(ss.getIP())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Work!

Copy link
Member

@fluffybeing fluffybeing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the required changes.

@apexkid apexkid assigned fluffybeing and ghost Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants