Questions tagged [copas]

copa stands for Coroutine Oriented Portable Asynchronous Services for Lua and it is a packet dispatcher on top of lua sockets.

4 questions
2
votes
0 answers

luasocket + copas error - attempt to yield across C-call boundary

I'm new to Lua and trying to implement TCP server and client in Openwrt using luasocket and copas. The goal is to make 3 program communicate with each other via socket in asynchronous networking. Below is the script local copas =…
mffathurr
  • 21
  • 1
1
vote
1 answer

Multiclient Copas server using Lua

Ok, finally I need some help... I'm trying to set up a lua server which is listening to several clients at the same time. We are programming an Android game using lua and this game has to communicate with my server. I need to send and receive data…
0
votes
1 answer

Сopas. Pass headers in request and select a request method

I use the copas library for non-blocking requests. I ran into a problem. I can’t understand how to pass the following header: “Content-Type: application/json” and I also want to switch between the POST and GET methods, how can this be done? My…
Coffee inTime
  • 231
  • 1
  • 8
0
votes
0 answers

Lua Copas: Sender coroutine just stops working

I have a problem using latest Copas in Lua 5.2. I wrote a simple script (see below) which creates two server sockets: "RX" and "TX". "RX" listens for messages from connected clients, "TX" transmits those messages to clients connected to "TX". The…
arngineer
  • 105
  • 1
  • 1
  • 8