Questions tagged [libuv]

libuv is a platform layer for Node written in C. Its purpose is to abstract IOCP on Windows and libev-like functionality on Unix systems.

libuv is a platform layer for node.js written in C. Its purpose is to abstract IOCP on Windows and libev on Unix systems. It is intended to eventually contain all platform differences in this library.

400 questions
0
votes
1 answer

Curl Multi Fetch Urls at Same Time

I'm trying to make a program that can fetch multiple URLs at once. I'm using this example code of libcurl and libuv http://curl.haxx.se/libcurl/c/multi-uv.html When I compile it and pass the program a few URLs such as /curl_fetch google.com…
cwings
  • 51
  • 5
0
votes
1 answer

Using C Functions Defined in Shared Object Without Renaming Them

I have been reading the on-line book Basics of libuv and trying to rewrite them to work with both a static link and a dynamic link to the libuv library. I rewrote the watchers example (code below), but I had to "rename" the functions I retrieved…
Elzair
  • 452
  • 1
  • 4
  • 11
0
votes
1 answer

libuv - How to use binary protocol

I have client-server application when communicotion by simple binary protocol. The binary protocol have 12 byte header (see code) when four byte is length of data [datasize] and data block size of datasize. struct header { int32_t…
user1514692
  • 60
  • 1
  • 8
0
votes
2 answers

Puzzling behavior, malloc and free(), with libuv

Using the sample code to learn about libuv I have come across a side effect I don't understand for sure. The code uses malloc() to obtain memory to store data from a client on the network and then send the same data back, just echos. It then uses…
Edward Goodson
  • 302
  • 1
  • 11
0
votes
3 answers

What does a struct type before a pointer argument do?

I would like to know what following syntax does: func((some_type*) apointer) Is this a simple type check or does this do something more? Why are there brackets required around the type? whole example from…
bodokaiser
  • 15,122
  • 22
  • 97
  • 140
0
votes
2 answers

Does libuv cause memory leak in uv_listen()?

I test my small program that uses libuv. Program's debug output shows memory leak. condition libuv version #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 9 os: windows 7.0 compiler: vs2010 my test code #include "stdafx.h" #include…
io0000
  • 1
-1
votes
1 answer

Details of how Node JS works?

I want to ask some clarifying questions about NodeJS, which I think are poorly described on the resources I studied. Many sources say that NodeJS is not suitable for complex calculations, because it is single-threaded and queries are executed…
-1
votes
1 answer

How a single threaded application can be asynchorous nodejs

Node js is a single-threaded application even though it executes the asynchronous operation my initial understanding about this was like this “The Event loop runs in a separate thread in the user code. There is a main thread where the JavaScript…
AdminRoy
  • 105
  • 1
  • 8
-1
votes
1 answer

C function calling without required parameters

I've been looking at this source code provided by developers of a library called libuv. In some of the example code they pass a function as a parameter for another function but none of the required parameters are passed. How are the parameters…
rreichel
  • 794
  • 3
  • 9
  • 25
-2
votes
1 answer

NodeJs Event loop in libuv and V8?

The NodeJs consists of V8 engine and also libuv library. V8 engine has its own event loop which has call stack , event queue & micro task queue which is used to run our mainland code. The libuv has event loop as well which consist of phases like…
1 2 3
26
27