<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 23, 2014 at 9:00 PM, Alejandro Zamora Fonseca <span dir="ltr"><<a href="mailto:terefv@ltu.sld.cu" target="_blank">terefv@ltu.sld.cu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When I do:<br>
<br>
1)Write this code: in Dr. Racket:<br>
<br>
#lang racket<br>
(define server (tcp-listen 12345))<br>
(define-values (s-in s-out) (tcp-accept server))<br>
<br>
2)Ctrl+R<br>
- DrRacket waits(lock the REPL) for connections<br>
<br>
3)Write this code in python:<br>
import socket<br>
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>
s.connect(('localhost', 12345))<br>
- DrRacket unlock the REPL<br>
4)s.send("hello") #in Python<br></blockquote><div><br></div><div>Use sendAll instead of send and include an end-of-line in the string.</div><div><br></div><div>Best,</div><div>António.</div></div></div></div>