Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created August 24, 2012 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/4a987af5c3ba69951e8a to your computer and use it in GitHub Desktop.
Save bnoordhuis/4a987af5c3ba69951e8a to your computer and use it in GitHub Desktop.
diff --git a/src/unix_dgram.cc b/src/unix_dgram.cc
index 3201b0a..f136b85 100644
--- a/src/unix_dgram.cc
+++ b/src/unix_dgram.cc
@@ -113,6 +113,7 @@ void OnRecv(uv_poll_t* handle, int status, int events) {
SetErrno(errno);
goto err;
}
+ fprintf(stderr, "ioctl(FIONREAD) = %d\n", size);
buf = Buffer::New(size);
argv[1] = buf->handle_;
@@ -262,6 +263,7 @@ Handle<Value> Send(const Arguments& args) {
iov.iov_base = Buffer::Data(buf) + offset;
iov.iov_len = length;
+ fprintf(stderr, "length=%zu, iov.iov_len=%zu", length, iov.iov_len);
strncpy(sun.sun_path, *path, sizeof(sun.sun_path) - 1);
sun.sun_path[sizeof(sun.sun_path) - 1] = '\0';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment