22 July 2012 Socket: Exemple de création d’un Client d’echo ‘TCP’ Réseaux import socket # création d'un socket de genre Internet sock = socket.socket(socket.AF_INET,import socket # création d'un socket de genre Internet sock = socket.socket(socket.AF_INET, python
28 June 2012 Python: Afficher l’adresse IP de l’ordinateur Réseaux import socket "Afficher l'adresse IP de la machine locale"import socket "Afficher l'adresse IP de la machine locale" python
25 June 2012 Obtenir le nom de la machine locale Réseaux import socket # Afficher le nom de votre poste hostname = socket.gethostname() print "Nom dimport socket # Afficher le nom de votre poste hostname = socket.gethostname() print "Nom d python
10 June 2012 Socket: Exemple de création d’un Serveur d’echo ‘TCP’ Réseaux import socket # création d'un socket de genre Internet sock = socket.socket(socket.AF_INETimport socket # création d'un socket de genre Internet sock = socket.socket(socket.AF_INET python
2 June 2012 Obtenir les informations nécessaire sur la création des socket sur un service Réseaux import sys, socket result = socket.getaddrinfo("77.238.178.122", None) print result[0][4]import sys, socket result = socket.getaddrinfo("77.238.178.122", None) print result[0][4] python
26 May 2012 Trouver le ‘hostname’ lié à une Adresse IP Réseaux import sys, socket try: result = socket.gethostbyaddr("209.85.148.138") print "Hostimport sys, socket try: result = socket.gethostbyaddr("209.85.148.138") print "Host python
26 April 2012 Socket: Communication des datagrammes UDP, envoi et reception des messages Réseaux import socket # Création d'un socket de type datagramme s = socket.socket(socket.AF_INET, simport socket # Création d'un socket de type datagramme s = socket.socket(socket.AF_INET, s python
25 April 2012 Vérifier si par défaut, les sockets sont autorisés à ré-utilisation les adresses Réseaux import socket s = socket.socket( ) print s.getsockopt(s.SOL_SOCKET, s.SO_REUSEADDR)import socket s = socket.socket( ) print s.getsockopt(s.SOL_SOCKET, s.SO_REUSEADDR) python
20 February 2012 Afficher la liste des options des socket Réseaux import socket solist = [x for x in dir(socket) if x.startswith('SO_')] solist.sort() for x iimport socket solist = [x for x in dir(socket) if x.startswith('SO_')] solist.sort() for x i python
20 February 2012 Se connecter à un siteweb via un socket Réseaux import socket # Création d'un socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)import socket # Création d'un socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) python