Sockets: Difference between revisions

Content added Content deleted
m (omit TI-BASIC)
(→‎{{header|Python}}: Needs to be imported or referenced in its namespace)
Line 343: Line 343:
=={{header|Python}}==
=={{header|Python}}==
<lang python>import socket
<lang python>import socket
sock = socket.socket(AF_INET, SOCK_STREAM)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("localhost", 256))
sock.connect(("localhost", 256))
sock.sendall("hello socket world")
sock.sendall("hello socket world")