Gracias por la explicación daryo ![:laugh: :laugh:](https://forum.elhacker.net/Smileys/navidad/laugh.gif)
Saludos.
![:laugh: :laugh:](https://forum.elhacker.net/Smileys/navidad/laugh.gif)
Saludos.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú[bubble@bubble Escritorio]$ python socketserver.py
Traceback (most recent call last):
File "socketserver.py", line 3, in <module>
s = socket.socket()
AttributeError: type object '_socketobject' has no attribute 'socket'
[bubble@bubble Escritorio]$
from socket import *
s = socket.socket()
s.bind(("localhost", 9999))
s.listen(1)
sc, addr = s.accept()
while True:
recibido = sc.recv(1024)
if recibido == "quit":
break
print "Recibido:", recibido
sc.send(recibido)
print "adios"
sc.close()
s.close()
from socket import *
s = socket.socket()
s.connect(("localhost", 9999))
while True:
mensaje = raw_input("> ")
s.send(mensaje)
if mensaje == "quit":
break
print "adios"
s.close()
import socket
[root@bubble Escritorio]# python socketserver.py
Traceback (most recent call last):
File "socketserver.py", line 1, in <module>
from socket import *
File "/home/bubble/Escritorio/socket.py", line 3, in <module>
s = socket.socket()
TypeError: 'module' object is not callable
[root@bubble Escritorio]#
Citarhttp://mamaquieroserpentester.blogspot.com.ar