LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2005, 03:45 PM   #1
karlan
Member
 
Registered: Aug 2003
Location: San Francisco, California
Distribution: Slackware
Posts: 158

Rep: Reputation: 30
Question about writing (char)0 to a pipe.


I am working on a brand new*, commercial quality server-side api in pure C (along with a full featured web server built with it), just in case you'd like to know.....help?. This project will not be open source, per-se, but no worries

But my problem is:

Code:
I am using a pipe between the interface which 
reads files and sends them.  However, I cannot send
(char)0 through the pipe without closing it, or something?
The hack which I have conjured slows down the transfers far
to much to be acceptable [for me].

What other IPC could I use? Perhaps faster? 
Also, what other sendfile() functions are there on other OSes?

I have an almost POSIX/ANSI implementation, and I don't want to
add to many wierd hacks, except for systems were its really worth it.


*I made a crappy on in C++ about a year ago. email me if you'd like the LGPLed source free of charge.

+Both servers support files, dir listings, and CGI(incl POST)

++The newer web server adds support for HTTP/0.9, better directory listing, persistent connections. Also, it is a brand new code base, built on a nice API, saving and porting only the good C++ code.

Sorry guys, gotta plug my server

Last edited by karlan; 06-05-2005 at 03:48 PM.
 
Old 06-05-2005, 05:23 PM   #2
karlan
Member
 
Registered: Aug 2003
Location: San Francisco, California
Distribution: Slackware
Posts: 158

Original Poster
Rep: Reputation: 30
I just figured out a way around all this with socketpair (books *are* worth buying).

Anyways, anyone wanting to try beta binaries on linux x86, or helping with the C development (I wrote the API so it is **REALLY** easy to add a new feature to the web server) please email me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
char * question Kroenecker Programming 18 11-04-2005 04:45 PM
C pointers confusion - char ** = char [][] ?? saravkrish Programming 12 12-02-2004 11:06 AM
C Problem---convert char to char* totti10 Programming 11 11-06-2004 12:32 PM
invalid conversion from `char' to `const char* bru Programming 6 05-09-2004 04:07 PM
Pipe command question satimis Linux - Newbie 8 01-07-2004 11:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration