You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# get local machine name where we will connect afterwards to do what we got to do
def join_group(group,username):
# create a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#!!!!! socket.gethostname() !!!! return a string containing the hostnameof the machine where the python interpreter is currently executing if you want to know the current machines s ip address you may want to use gethostbyname(gethostname()).
host = socket.gethostname() #returns name of the machine may cause problem with different ips. if so we need to specify somehow where to connect