04-27-2016
Something fishy is going on with the way the connection lags before delivering the content of the first page...
9 More Discussions You Might Find Interesting
1. Programming
Hello everyone, I am a newbie in UNIX/Linux socket programming. This is a class project that I had trouble with.
==================================================
I was trying to make “Keep-Alive” HTTP connections to the server in a tiny web crawler project. Here is the problem: when I tried... (0 Replies)
Discussion started by: imdupeng
0 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm investigate about a problem regarding a connection between two server (S1 and S2).
A client software on S1 made a pool of connections on S2; for some reason some connections end but sockets still alive on S2 and not on S1.
I always knew about sockets as a pair of processes; is it... (1 Reply)
Discussion started by: grado
1 Replies
3. Shell Programming and Scripting
Hi
I want to keep my script running even when i am logged off from the box.
can we run the script in background which can automatically run every hour?
Please advise.
Thank you (1 Reply)
Discussion started by: Prateek007
1 Replies
4. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
5. Programming
Hi all,
On the server side, one socket is used for listening, the others are used for communicating with the client.
My question is: if i want to set option for socket, which socket should be set on?
If either can be set, what's the different?
Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies
6. Programming
Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct...
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include... (3 Replies)
Discussion started by: cyler
3 Replies
7. Programming
Dear Experts,
i am compiling my code in suse 4.1 which is compiling fine,
but at runtime it is showing me for socket programming error no 88
as i searched in errno.h it is telling me socket operation on non socket,
what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies
8. IP Networking
I need clarification on whether it is okay to set socket options on a listening socket
simultaneously when it is being used in an accept() call?
Following is the scenario:-
-- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
9. What is on Your Mind?
Odd thing.
I posted in the Solaris forum, new user, just asking for a bit of advice. Nothing too complicated. As of this post there have been 140 views and zero replies. So that got me thinking, is this normal? I had a look around, and I see the same thing on many other threads, and in other... (2 Replies)
Discussion started by: _JonB_
2 Replies
LEARN ABOUT DEBIAN
ns_conncopytofile
Ns_ConnCopy(3aolserver) AOLserver Library Procedures Ns_ConnCopy(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_ConnCopyToChannel, Ns_ConnCopyToDString, Ns_ConnCopyToFd, Ns_ConnCopyToFile - Copy request content to open file or dstring
SYNOPSIS
#include "ns.h"
int
Ns_ConnCopyToChannel(conn, ncopy, chan)
int
Ns_ConnCopyToDString(conn, ncopy, dsPtr)
int
Ns_ConnCopyToFd(conn, ncopy, fd)
int
Ns_ConnCopyToFile(conn, ncopy, fp)
ARGUMENTS
Ns_Channel chan (in) Pointer to Tcl channel open for write.
Ns_Conn conn (in) Pointer to open connection.
Ns_DString dsPtr (in) Initialized dstring.
int fd (in) File descriptor open for write.
FILE fp (in) Stdio FILE pointer open for write.
int ncopy (in) Number of bytes to copy.
_________________________________________________________________
DESCRIPTION
These functions copy content from an open connection request to the given open file descriptor, FILE, dstring, or Tcl_Channel. The rou-
tines work by copying from the content buffer; see the man page on Ns_ConnContent for how this buffer is managed for both small and large
requests.
The functions all return the number of bytes copied which will match the requested ncopy argument unless there is an error writing the con-
tent or the requested bytes is greater than the number of bytes still available to be read. An internal offset into the connection is
maintained and is shared with routines such as Ns_ConnRead which also consume content from the same buffer. Note that routines which
access the entire content, e.g., Ns_ConnContent, Ns_ConnContentFd, or Ns_ConnGetQuery will continue to provide access to the entire request
regardless if one of the Ns_ConnCopy or Ns_ConnRead functions have been used.
EXAMPLES
The following example demonstrates copying user data to a temp file:
fd = open("myfile.out", O_WRONLY|O_BINARY);
len = Ns_ConnContentLength(conn);
if (Ns_ConnCopyToFd(conn, len, fd) != len) {
... error writing content or content already consumed ...
}
SEE ALSO
Ns_ConnRead(3), Ns_ConnReadLine(3), Ns_ConnContent(3), Ns_ConnContentFd(3)
KEYWORDS
connection, content, read
AOLserver 4.0 Ns_ConnCopy(3aolserver)