10-11-2005
Perderabo, thanks a lot.
After select() and if(FD_ISSET(fd, &rfds)), then I read the buffer. As you mentioned, I only can read 8 bytes one time (my full reply message is 13 bytes) by "result1=read(fd,buffer,13);" (result1=8). After I read these 8 bytes, I have to read the buffer one byte after another to get correct message. If I use "result2=read(fd,buffer1,13)" after first 8 bytes read, result2 always is 0. Is there anyway I can use multiple block reads to get a full message? Or how can I get one read more than 8 bytes in my case in one read?
10 More Discussions You Might Find Interesting
1. HP-UX
Hi
I have a doubt regarding process states in HP unix system. Is there a way to check whether a process is hanged or still actively running? I have few scripts which run for a long time. but sometimes these are getting hanged. But i'm never sure whether they are running or waiting in kind of... (4 Replies)
Discussion started by: truth
4 Replies
2. Programming
:(Hi,
There is a class in C++ called "CL". It should not participate in inheretance. If some body inherit it it should give errors.....:( (0 Replies)
Discussion started by: krishna_sicsr
0 Replies
3. UNIX for Dummies Questions & Answers
hello guy,
i really have a hard time complete one of my school paper.
Does anyone how Unix deal with Deadlock situation. ><;
Description or theory is good enough. ^^".
Thank you for your kindness,
Jaideej (1 Reply)
Discussion started by: jaideej
1 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
how to find which all processes cause deadlock into the system and how we can resolve in Unix platform. (1 Reply)
Discussion started by: ravi.sadani19
1 Replies
5. UNIX for Advanced & Expert Users
I have one shell script which is being accessed by many jobs at same time.
I want to make the script such that , other job should wait for the script if script is being used by some other job. Is there any way to implement it in script level ?
Gops (1 Reply)
Discussion started by: Gopal_Engg
1 Replies
6. UNIX for Dummies Questions & Answers
I understand that on my HP-UX 11.31 system when print queues can no longer communicate with remote printers, the queue disables itself. How can I configure it to stop disabling itself, or alternatively, to re-enable itself when the remote printer comes back online? I have users in warehouses who... (6 Replies)
Discussion started by: EatenByAGrue
6 Replies
7. Shell Programming and Scripting
Hi,all.Well,I know someone has already asked this question before,however,It's too long before.So i post a new thread here.
Here is the issue.I have a shell script that use awk to calculate something and the script takes about 15 mins,it will use 100% CPU,and the system automatically killed the... (2 Replies)
Discussion started by: homeboy
2 Replies
8. Shell Programming and Scripting
Hi,
I've been searching around for solution, hope that some gurus here can help.
I'm using some commands in my shell script and I'd like to protect these command to be moved to another directory. For instance, cp currently in /bin/cp. If I move it to /bin/cpxxx, my script will not be able to... (3 Replies)
Discussion started by: gklntn
3 Replies
9. UNIX for Advanced & Expert Users
When invoking unix commands from other third party tools (IBM ETL), we run the rm / mv commands with the folder as argument been passed. Eg
rm -rf {folder}/*
when the parameter {folder} did not pass rightly or becomes blank, the command becomes dangerous to execute rm -rf /*
How to prevent... (9 Replies)
Discussion started by: deepakwins
9 Replies
10. Emergency UNIX and Linux Support
If an email is sent from our application server(running on AIX) to an id that is outside of the organization like gmail etc, and if gmail should not treat the mail as spam, what has to be done from unix level? (7 Replies)
Discussion started by: ggayathri
7 Replies
LEARN ABOUT DEBIAN
ne_set_request_body_buffer
NE_SET_REQUEST_BODY_(3) neon API reference NE_SET_REQUEST_BODY_(3)
NAME
ne_set_request_body_buffer, ne_set_request_body_fd, ne_set_request_body_fd64 - include a message body with a request
SYNOPSIS
#include <ne_request.h>
void ne_set_request_body_buffer(ne_request *req, const char *buf, size_t count);
int ne_set_request_body_fd(ne_request *req, int fd, off_t begin, off_t length);
DESCRIPTION
The ne_set_request_body_buffer function specifies that a message body should be included with the body, which is stored in the count bytes
buffer buf.
The ne_set_request_body_fd function can be used to include a message body with a request which is read from a file descriptor. The body is
read from the file descriptor fd, which must be a associated with a seekable file (not a pipe, socket, or FIFO). count bytes are read,
beginning at offset begin (hence, passing begin as zero means the body is read from the beginning of the file).
For all the above functions, the source of the request body must survive until the request has been dispatched; neither the memory buffer
passed to ne_set_request_body_buffer nor the file descriptor passed to ne_set_request_body_fd are copied internally.
SEE ALSO
ne_request_create
AUTHOR
Joe Orton <neon@lists.manyfish.co.uk>
Author.
COPYRIGHT
neon 0.29.6 3 May 2011 NE_SET_REQUEST_BODY_(3)