[racket] Help with sockets.

From: Antonio Menezes Leitao (antonio.menezes.leitao at ist.utl.pt)
Date: Wed Apr 23 17:32:41 EDT 2014

Hi,

On Wed, Apr 23, 2014 at 9:00 PM, Alejandro Zamora Fonseca <terefv at ltu.sld.cu
> wrote:

> When I do:
>
> 1)Write this code: in Dr. Racket:
>
> #lang racket
> (define server (tcp-listen 12345))
> (define-values (s-in s-out) (tcp-accept server))
>
> 2)Ctrl+R
> - DrRacket waits(lock the REPL) for connections
>
> 3)Write this code in python:
> import socket
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s.connect(('localhost', 12345))
> - DrRacket unlock the REPL
> 4)s.send("hello") #in Python
>

Use sendAll instead of send and include an end-of-line in the string.

Best,
António.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140423/d555945b/attachment.html>

Posted on the users mailing list.