The USOCKET project wants to provide a portable TCP/IP and UDP/IP socket interface for as many Common Lisp implementations as possible, while keeping the abstraction and portability layer as thin as possible.
Questions tagged [usocket]
21 questions
5
votes
1 answer
Receiving data through LISP USOCKET
I'm trying to send data over USOCKET. When the data reaches the server, the server should reply back. However, stream-read (as defined below) only returns the data when it's echoed back with the original data it sent. For example, if I send hello…

W01
- 149
- 3
- 15
4
votes
1 answer
WebSocket client in Common Lisp with usocket library
I'm trying to upgrade a protocol, switching from HTTP 1.1 to WebSockets. I've tried to use the usocket. My code so far follows (and is available as a GitHub gist). After the handshake reading, functions return NIL or unexpected EOF error.
;; Define…

inkuzmin
- 96
- 6
3
votes
1 answer
Drakma and Dexador both fails at USocket call while requesting localhost only, requesting the internet works fine
There is an unexplained behavior for me for the moment, appreciate any clues.
Background
I have a locally running instance of wordpress via PHP built-in development webserver php -S localhost:8000 -t /doc/root/wordpress. The site works, I can fetch…

hsrv
- 1,372
- 10
- 22
3
votes
3 answers
Single-threaded sequence-reading multi-user usocket server
I'm trying to write a simple server program using the usocket library that will perform a relatively trivial task - say, echoing data back. I want to make it able to do this with multiple clients, not having the single thread blocked while waiting…

Reepca
- 323
- 2
- 7
3
votes
1 answer
How to use usocket to create a connection? (common lisp)
I'm trying to use socket in lisp to create a connection. Using sbcl, i found "usocket" available. But I failed to sending strings between the server and client. Here's the code:
Server:
(ql:quickload "usocket")
(use-package 'usocket)
(defun…

Heranort
- 85
- 4
3
votes
1 answer
Read-line from socket-stream in lisp
I am working on a TCP client in lisp, and am having difficulties reading/printing the socket-stream correctly. When the client sends data to the server it should receive a response, and I need to write this to stdout. This works correctly, except…

unbootabru
- 347
- 1
- 3
- 9
3
votes
1 answer
How do I check whether the other end has closed my socket stream, from a single thread?
The usocket FAQ suggests that the way I should do this is by reading from a socket-stream and checking for an end-of-file result. That works in the case where I've got one thread active per socket, but it doesn't seem to satisfy for the case where…

Inaimathi
- 13,853
- 9
- 49
- 93
1
vote
0 answers
How can I resolve "sbcl.fasl" not found when trying to install usocket library for common-lisp [sbcl / WSL1 - Ubuntu 18.04.5]
I'm trying to use dexador library for lisp and cannot install it. I'm using quicklisp as package manager. I've been trying to use the command
(ql:quicklisp :dexador)
to load the desired library.
this command fails with given message…

Koom
- 11
- 2
1
vote
1 answer
Issues with non-blocking server sockets using polling in MicroPython
I am trying to put together a simple thermometer that provides the temperature on the OLED display as well as via http requests on an ESP8266 using MicroPython.
A Poller Object has been used to prevent the websocket from blocking the loop (so…

Felipe
- 58
- 7
1
vote
1 answer
What is the purpose of the socket-close in this Common Lisp example?
I've found this example from the Common Lisp Cookbook which shows how to start a TCP server with usocket.
The example creates a socket object and establishes a connection, and then writes to the socket. In case of error, the socket write is wrapped…

Display name
- 721
- 2
- 11
- 29
1
vote
0 answers
Error: The condition Bad address (error #14) , fail to run Huntentoot on Clozure CL
I am trying to run hunchentoot on IBM power6 and only clozure cl is available on that platform. I have tried this :
1.lisp
(hunchentoot:start (make-instance 'hunchentoot:easy-acceptor :port 80))
(hunchentoot:define-easy-handler (say-yo :uri "/yo")…

Bah4i
- 31
- 2
1
vote
1 answer
USocket on SBCL: connection refused (Drakma and Dex)
Running simple HTTP-request:
with dexador or drakma
and on SBCL 1.4.14
and on OS X 10.13.6
with (ql:client-version) equals to "2017-03-06" and (defvar qlqs-info:*version* "2015-01-28" (I've just installed Quicklisp from…

hsrv
- 1,372
- 10
- 22
1
vote
0 answers
Hunchentoot test webserver usocket connection refused error
Trying to start the Hunchentoot test webserver but usocket is throwing a connection error in Mac OSX El-Capitan, SBCL 1.1.6.0-3c5581a
debugger invoked on a USOCKET:CONNECTION-REFUSED-ERROR:
Condition USOCKET:CONNECTION-REFUSED-ERROR was…

Rajasegar
- 86
- 4
1
vote
1 answer
land of lisp src webserver.lisp
while I was learning in "land of lisp" chapter 12 and 13 about "socket".
I use lispbox, so I need install a socket.At last, I found usocket available.
this is a sample about how to use usocket, to bulid a webserver.
(defun serve (request-handler)
…

lin yuansen
- 1
- 5
0
votes
0 answers
I cannot get a Python Websocket listener to listen and print a Micropython Client send call. I can make it work Python client to Python Server
I'm trying to have a Raspberry Pi Pico W read temp and other measurements and send via web socket to a server, which is a Raspberry Pi 4). The server, at this point, just prints the data out on the screen. I can make this work from one computer to…

gb101
- 1
- 1