Sponsored Content
Full Discussion: Problem with tcp server
Top Forums Programming Problem with tcp server Post 302390949 by Corona688 on Friday 29th of January 2010 01:01:06 PM
Old 01-29-2010
Do you know if sigchld_handler is actually being called?

Furthermore, whenever sigchld_handler is called, be sure to check for more than one child. SIGCHLD signals won't queue up if there's more than one, it'll just be missed. Which is annoying since you can't guarantee there'll never be a zombie with a callback but at least you can stop them from accumulating...

I don't see anything to do with a database here so it's impossible to be sure, but is it possible you're storing a pointer to the ip char array instead of a copy of its contents? That would mean every entry in whatever your database is would show the most recent IP address.
 

10 More Discussions You Might Find Interesting

1. Programming

Tcp Ip Server

i am programming a tcp_ip server which intends to listen permanently to a client . the client can disconnect and connect again and the server accept it(by this point it works).The problem is when the client lose connection without a disconnect command and my code can't get it and keeps waiting for... (4 Replies)
Discussion started by: massimo_ratti
4 Replies

2. UNIX for Dummies Questions & Answers

Tcp-server

I have true64 Unix running and there a scales in the sytem which connect thru a com-server to the network. they have their own IP-address and are communicating over port 8000. when I telnet to the com-servers and the print function of the scale is executed I can see the data coming. I need to know... (1 Reply)
Discussion started by: albinhess
1 Replies

3. Programming

How to check TCP server status

Please tell me according to C/C++ socket programming; how client can check whether server is running or not during TCP communication. (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

4. Solaris

TCP Problem

I am running a Java Client on Solaris 9 which communicates with the Server using TCP/IP. The client transmits a FIN packet to server. The server sends a ACK, FIN enters LAST_ACK state and then waits for ACK from client. The client did not respond back leaving the server in LAST_ACK itself. Also... (0 Replies)
Discussion started by: diarun
0 Replies

5. Red Hat

tcp/ip problem

how the data from disk is loaded into memory and then it transfered to tcp/ip packet. how i can find how many pages are loaded into memory by that process what is the rate of context switch for that process. (5 Replies)
Discussion started by: amar20
5 Replies

6. IP Networking

TCP server dies after few hours of inactivity

We have a NAS application which can be accessed by both HTTP and HTTPS connections. The issue we are facing is that the tcp server instance that initiates the HTTP access dies after a few hours of inactivity(the NAS application was kept idle for around 10 hours). However, the tcpserver that... (1 Reply)
Discussion started by: swatidas11
1 Replies

7. Programming

Concurrent TCP client/server

I made a program and now I need to make it concurrent. Can someone pls help me do this ? The code is this: #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <netinet/in.h> #include <errno.h> #include <unistd.h> #include <stdio.h> #include <string.h>... (4 Replies)
Discussion started by: Johnny22
4 Replies

8. Solaris

TCP listner on Solaris server

Hi, I am having a solaris server. I want to start a dummy TCP listner on UNIX OS on a specific port can anyone please let me know the process. IP ADDRESS: 123.123.123.123 Port: 8010 (1 Reply)
Discussion started by: mayank2211
1 Replies

9. UNIX for Dummies Questions & Answers

Tcp connection to Linux server fails

I am trying to send json messages to a port on a linux server from a remote server running a .net program. I have one implementation running with successful incoming messages to port 1514. I tried to replicate the same thing but just to another port but cannot get it to work as I get the following... (3 Replies)
Discussion started by: unienewbie
3 Replies

10. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

I have problem with oracle solaris 10 running on oracle sparc T4-2 server. Os information: 5.10 Generic_150400-03 sun4v sparc sun4v Output from tcpstat.d script TCP bytes: out outRetrans in inDup inUnorder 6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies
getnetpath(3N)															    getnetpath(3N)

NAME
getnetpath(), setnetpath(), endnetpath() - get /etc/netconfig entry corresponding to NETPATH component SYNOPSIS
DESCRIPTION
The routines described on this page are part of the Network Selection component. They provide the application access to the system network configuration database, as it is "filtered" by the environment variable (see environ(5)). See getnetconfig(3N) for other routines that also access the network configuration database directly. The variable is a list of colon-separated network identifiers. returns a pointer to the database entry corresponding to the first valid component. The entry is formatted as a On each subsequent call, returns a pointer to the entry that corresponds to the next valid component. can thus be used to search the database for all networks included in the variable. When has been exhausted, returns NULL. A call to "binds" to or "rewinds" must be called before the first call to and may be called at any other time. It returns a handle that is used by silently ignores invalid components. A component is invalid if there is no corresponding entry in the database. If the variable is unset, behaves as if were set to the sequence of "default" or "visible" networks in the database, in the order in which they are listed. may be called to "unbind" from when processing is complete, releasing resources for reuse. Programmers should be aware, however, that frees all memory allocated by for the data structure. MULTITHREAD USAGE
Thread Safe: Yes Cancel Safe: Yes Fork Safe: No Async-cancel Safe: No Async-signal Safe: No These functions can be called safely in a multithreaded environment. They may be cancellation points in that they call functions that are cancel points. In a multithreaded environment, these functions are not safe to be called by a child process after and before These functions should not be called by a multithreaded application that supports asynchronous cancellation or asynchronous signals. RETURN VALUES
returns a handle that is used by In case of an error, returns NULL. or can be used to print out the reason for failure. See getnetcon- fig(3N). When first called, returns a pointer to the database entry corresponding to the first valid component. When has been exhausted, returns NULL. returns on success and on failure (for example, if was not called previously). SEE ALSO
getnetconfig(3N), netconfig(4), environ(5). getnetpath(3N)
All times are GMT -4. The time now is 04:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy