08-03-2009
It's a socket thing, you'll have to tell the OS that the socket may be used more than once. A nice explanation of socket programming and the associated options can be found
here (
Main page)
Also, it might be a good idea to set up a signal handler for SIGINT, SIGTERM, ..., which cleans up the workspace (close sockets, free() memory, ...) if your program dies.
9 More Discussions You Might Find Interesting
1. Linux
Hi Everyone!
How can we make a socket() system call from a linux module executing in kernel space?
If any one knows, kindly tell me. It will be great.
I want to use the socket interface in linux kernel space for sending raw packets over the network.
Hamayun (0 Replies)
Discussion started by: mian_m_hamayun
0 Replies
2. UNIX for Dummies Questions & Answers
If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies
3. Linux
helo,
i m using linux operationg system at both client and server side.
Now in my application when i use ntohl() then it will give segmentation fault.
now when i remove nothl(), then it works fine.
can u tell me why this happen.
amit (8 Replies)
Discussion started by: amitpansuria
8 Replies
4. Programming
Hi,
I am having an issue with using sockets.
I have a program which binds to a socket and listen on it. Later I spawn a thread to handle some function. In the new thread created I need to call a shell script which executes the specified function. Here I am using a system command to call the... (5 Replies)
Discussion started by: Janardhanbr
5 Replies
5. Programming
Hi All,
My application gets hang at the popen statement in Soalris 5.8. While debugging I found that it halts at _lwp_sema_wait. After googling I have added /usr/lib/lwp in the LD_LIBRARY_PATH and now it halts at lwp_park. Please help me what I need to do to solve this issue. The application runs... (6 Replies)
Discussion started by: Amiya Rath
6 Replies
6. Programming
Problem
- Linux Client/Server Socket Application: Preventing Client from quitting on server crash
Hi,
I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64.
I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies
7. IP Networking
Hello ;
This what i want to do :
I know that in the system call
#include <sys/socket.h>
int bind(int socket, const struct sockaddr *address,
socklen_t address_len);
you can specify the local port for your socket, but im using a private library , and im sure that in that library... (0 Replies)
Discussion started by: trutoman
0 Replies
8. Red Hat
I encounter the following crash on RHEL 7.0 when I run a multithreaded video rendering application using GLFW and OpenGL. OpenGL version is 2.1 and MESA version is 9.3.0
Following is the back trace of the multi-threaded program I am working on:... (0 Replies)
Discussion started by: anuachin
0 Replies
9. HP-UX
Hi,
This weekend there was a sudden application crash in the server.
I did not know where to start to investigate the problem, so I first looked into the /var/adm/syslog/syslog.log, and this was what I found :
Dec 17 00:38:02 L28bi01 sshd: error: accept: No buffer space available
Dec 17... (9 Replies)
Discussion started by: anaigini45
9 Replies
LEARN ABOUT DEBIAN
ns_relativeurl
Ns_Url(3aolserver) AOLserver Library Procedures Ns_Url(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_AbsoluteUrl, Ns_ParseUrl, Ns_RelativeUrl, Ns_SkipUrl - URL manipulation routines
SYNOPSIS
#include "ns.h"
int
Ns_AbsoluteUrl(Ns_DString *pds, char *url, char *baseurl)
int
Ns_ParseUrl(char *url, char **pprotocol, char **phost,
char **pport, char **ppath, char **ptail)
char *
Ns_RelativeUrl(char *url, char *location)
char *
Ns_SkipUrl(Ns_Request *request, int n)
_________________________________________________________________
DESCRIPTION
Ns_AbsoluteUrl(pds, url, baseurl)
Construct an URL based on baseurl but with as many parts of the incomplete url as possible. Return NS_OK or NS_ERROR.
Ns_ParseUrl(url, pprotocol, phost, pport, ppath, ptail)
Parse a URL into its component parts. Pointers to the protocol, host, port, path, and "tail" (last path element) will be set by ref-
erence in the passed-in pointers. The passed-in url will be modified.
Ns_RelativeUrl(url, location)
If the url passed in is for this server, then the initial part of the URL is stripped off. e.g., on a server whose location is
http://www.foo.com, Ns_RelativeUrl of "http://www.foo.com/hello" will return "/hello". Returns a pointer to the beginning of the
relative url in the passed-in url, or NULL if error. Will set errno on error.
Ns_SkipUrl(request, n)
Return a pointer n elements into the request's url.
SEE ALSO
nsd(1), info(n)
KEYWORDS
AOLserver 4.0 Ns_Url(3aolserver)