Maximum length of buffer in AF_UNIX socket
Hi all! I would like to know: when programming in C using a socket (AF_UNIX) is there any limit (in bytes) when sending or receiving to or from a socket? Thank you! —Albé ...
Hi all! I would like to know: when programming in C using a socket (AF_UNIX) is there any limit (in bytes) when sending or receiving to or from a socket? Thank you! —Albé ...
Hi, I'd like to handle directly 64-bit words on the CUDA platform (eg. uint64_t vars). I understand, however, that addressing space, registers and the SP architecture are all 32-bit based. I actually found this to work correctly (on my CUDA cc1.1 card): __global__ void test64Kernel( uint64_t *word ) { (*word) <<= 56; } but I don'...
Hey guys, My program is meant to parse through a text file, extract relevant data and then save it in a SQL table. I compile it like so.. gcc -o parse parse.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient_r then I run it like so... ./parse > tweets.rss But it just hangs. it doesn't print any printf's I put in to debug. W...
Hi everyone: I want to write a program to receive a argument from command line. It's like a kind of atof(). There my program goes: 9 char s[] = "3.1415e-4"; 10 if (argc == 1) { 11 printf("%e\n",atof(s)); 12 } 13 else if (argc == 2) { 14 //strcpy(s, argv[1]); 15 printf("%e\n",atof(argv[1]...
Hi, I would like to trace calls to some 3rd party library which are made from another 3rd party library. Example: I want to trace calls to library A. My application statically links library B, which in turn is statically linked to library A. So basically what I have is libAB.a In case of dynamic linking I could write library A2 with ...
I checked out a post similar to this but the linkage was different the issue was never resolved. The problem with mine is that for some reason the linker is expecting there to be a definition for the base class, but the base class is just a interface. Below is the error in it's entirety c:\users\numerical25\desktop\intro todirectx\godfi...
I need to read from an AF_UNIX socket to a buffer using the function read from C, but I don't know the buffer size. I think the best way is to read N bytes until the read returns 0 (no more writers in the socket). Is this correct? Is there a way to guess the size of the buffer being written on the socket? I was thinking that a socket...
Hello, is there any way to convert a time_t to a string with the format YYYY-MM-DD HH:MM:SS automatically, keeping the code portable? ...
I am trying to address this issues because I can not seem to find a good resource online that does so. I do not fully understand the issue cause I never got it resolved so I will try to describe it as best as possible. Awhile ago I had an issue where headers were being ignored because "They were called once already and therefore when ...
I've lots of different structs containing enum members that I have to transmit via TCP/IP. While the communication endpoints are on different operating systems (Windows XP and Linux) meaning different compilers (gcc 4.x.x and MSVC 2008) both program parts share the same header files with type declarations. For performance reasons, the s...
Hi I have a collection of points which describe the surface of a shape that should be roughly spherical, and I need a method with which to determine if any other given point lies within this shape. I've previously been approximating the shape as an exact sphere, but this has proven too inaccurate and I need a more accurate method. Simpl...
There is a simple application written in C, which includes only standard C library functions (from stdio, stdlib, etc.) and Makefile+GCC to build it. Now, I wanna port it to iPhone OS for iPhone/iPads. Will it be seamless or are there any possible incompatibility issues? ...
I'm writing a NON-GUI app which I want to be cross platform between OS X and Windows. I'm looking at the following architecture, but I don't know if it will work on the windows side: (Platform specific entry point) -> ANSI C main loop => ANSI C model code doing data processing / logic => (Platform specific helpers) So the core stuff I...
I have a very large binary file and I need to create separate files based on the id within the input file. There are 146 output files and I am using cstdlib and fopen and fwrite. FOPEN_MAX is 20, so I can't keep all 146 output files open at the same time. I also want to minimize the number of times I open and close an output file. How ...
I would like to check a network devices status e.g. promiscous mode. Basically like shown with ip a command. Maybe someone could push me in the right direction? I would need this in C for linux so linux specific headers may be included. Thanks in advance! ...
I am not sure if this belongs to Stackoverflow or Superuser but I thought I would ask here. I have a console based application written in C which currently takes about an hour to terminate in Windows 7 64-bit OS. The task manager reports that the application is using only 25% of the available CPU. I would like to reduce the run time by ...
Hi How do I use mqueue (message queue) in a c program on a Linux based system? I'm looking for some good code examples that can show how this is done in a correct and proper way, maybe a howto. Thanks ...
A simple find/replace will not work for code commented out like this: ex: /* templine1 templine2 templine3 */ Got any ideas? ...
Hi, for a long time, I am thinking and studying output of C language compiler in assembler form, as well as CPU architecture. I know this may be silly to you, but it seems to me that something is very ineffective. Please, don´t be angry if I am wrong, and there is some reason I do not see for all these principles. I will be very glad if ...
There have been other questions regarding the subject of verifying the accessibility and accessibility of socket ports. How would one go about looking for a port to listen on dynamically in C/C++? The basic process I'm trying to accomplish is this: Client starts Client finds open port XYZ and listens on it. Client transmits a basic...