Solved

Solaris Sockets ?

Posted on 1997-04-30
4
292 Views
Last Modified: 2013-12-05
I am working on a client server project using AF_INET sockets in Solaris 2.5.1.

I am constantly rebooting my servers, and such, and each time the address is left binded and I have to wait for the OS to free up the address. (I know it is my sloppy code doing this, that is on the list to be fixed) but in the meantime is there any way I can free these up myself?

Sorry, I can only offer 15pts, all I have left. How do I get more points anyways? I cannot answer any of the questions. (when I tried it said I had to be an expert)
0
Comment
Question by:wcarson
  • 2
4 Comments
 

Author Comment

by:wcarson
ID: 1250193
Edited text of question
0
 
LVL 1

Expert Comment

by:flisakow
ID: 1250194

Answering questions does not give you points to ask more
questions, you can get a free T-shirt after 20,000 expert
points or some such.

You can buy the points if you like, otherwise they collect
at 5pts/day.

Sorry I don't know the answer, I've had similar problems myself
but I eventually ended up fixing the program.
0
 
LVL 1

Expert Comment

by:flisakow
ID: 1250195

Answering questions does not give you points to ask more
questions, you can get a free T-shirt after 20,000 expert
points or some such.

You can buy the points if you like, otherwise they collect
at 5pts/day.

Sorry I don't know the answer, I've had similar problems myself
but I eventually ended up fixing the program.
0
 

Accepted Solution

by:
kannan042597 earned 10 total points
ID: 1250196
This is not a problem and its only a feature of TCP/IP.  When a program binds an address to a port and after quitting the program it you try to restart the same with the same address and port number the TCP/IP stack will report an error saying that the address is already in use.  This is because of the 2 * MSL timer value. ( which is general 2 * 2 = 4 minutes ).  This way the TCP/IP stack avoids any delayed data to that particular socket wrongly arriving to the new program.  You can avoid this error by tuning the TCP/IP stack using the ndd program.  see the man pages for ndd to set the MSL timer value.

regards
kannan.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question