Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Closing Ports
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
PrOpHeT  
View profile  
 More options May 13 2007, 12:14 pm
From: PrOpHeT <grix...@gmail.com>
Date: Sun, 13 May 2007 09:14:09 -0700
Local: Sun, May 13 2007 12:14 pm
Subject: Closing Ports
We're encountering a problem mainly on Athena. We're using specific
ports, and calling the close(socketID); when the socket is not needed
anymore.  We where getting problems when for example .. loading the
server, closing it, and then loading it again getting a bind error.
So we ran netstat -an and found out that the port was still visible
there marked as 'TIME_WAIT'.

Is someone encountering the same problem? And if yes, what are we
doing wrong, and how should we fix it?

Lincoln


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
agius.ian@gmail.com  
View profile  
 More options May 13 2007, 1:45 pm
From: "agius....@gmail.com" <agius....@gmail.com>
Date: Sun, 13 May 2007 17:45:25 -0000
Local: Sun, May 13 2007 1:45 pm
Subject: Re: Closing Ports
Hi,
I was discussing the same problem with other people. It seems that
when you close a port, it still remains 'activated' for a short amount
of time (it's something regarding the TCP/IP connection). Best thing
to do,if you used for eample port 1,change the ne*t try to port
2.Don't rely on my post though, cause I am just replying what they
told me and I may have misunderstood their answer.

regards Ian.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Camilleri  
View profile  
 More options May 13 2007, 2:12 pm
From: "Stefan Camilleri" <szc...@gmail.com>
Date: Sun, 13 May 2007 20:12:05 +0200
Local: Sun, May 13 2007 2:12 pm
Subject: Re: Closing Ports
Hi guys... this is a limitation of sockets... if you want to make the
socket instantly available again, change the socket options to with
the REUSADDR option set to 1.

It's covered in APUE

On 13/05/07, agius....@gmail.com <agius....@gmail.com> wrote:

> Hi,
> I was discussing the same problem with other people. It seems that
> when you close a port, it still remains 'activated' for a short amount
> of time (it's something regarding the TCP/IP connection). Best thing
> to do,if you used for eample port 1,change the ne*t try to port
> 2.Don't rely on my post though, cause I am just replying what they
> told me and I may have misunderstood their answer.

> regards Ian.

--
- Stefan Camilleri

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
PrOpHeT  
View profile  
 More options May 15 2007, 6:41 am
From: PrOpHeT <grix...@gmail.com>
Date: Tue, 15 May 2007 03:41:49 -0700
Local: Tues, May 15 2007 6:41 am
Subject: Re: Closing Ports
Hmm,

Will check it out. Thanks.

On May 13, 8:12 pm, "Stefan Camilleri" <szc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fwd: Closing Ports" by Stefan Camilleri
Stefan Camilleri  
View profile  
 More options May 15 2007, 7:37 am
From: "Stefan Camilleri" <szc...@gmail.com>
Date: Tue, 15 May 2007 13:37:34 +0200
Local: Tues, May 15 2007 7:37 am
Subject: Fwd: Closing Ports
int *sd; <- socket descriptor
int reuse=1; <- value to set

if(0>setsockopt(*sd,SOL_SOCKET,SO_REUSEADDR,&reuse,sizeof(reuse))){
     // ouch

}

else{
    // killex sew

}

On 15/05/07, PrOpHeT <grix...@gmail.com> wrote:

--
- Stefan Camilleri

--
- Stefan Camilleri


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Cordina  
View profile  
 More options May 16 2007, 3:11 am
From: Joseph Cordina <joseph.cord...@gmail.com>
Date: Wed, 16 May 2007 07:11:14 -0000
Local: Wed, May 16 2007 3:11 am
Subject: Re: Fwd: Closing Ports
It might still happen even if you use SO_REUSEADDR, your best
guarantee is to use a new socket since the order of closing the link
is also crucial.

Regards

Joe

On May 15, 1:37 pm, "Stefan Camilleri" <szc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google