Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

destroying socket

Posted on 2002-05-22
6
Medium Priority
?
435 Views
Last Modified: 2010-03-18
Hi,

I have a loop that close a socket if it is not equal to NULL and create the socket again. I can execute this loop 255 times. Why? How can I destroy the socket in order to avoid this problem?

Thanks in advance.
0
Comment
Question by:jjescri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 5

Expert Comment

by:BlackDiamond
ID: 7029987
Can you post the code for this?  From your description, the order of the loop sounds like:

if the socket is not NULL, close it.
create a new socket (socket is not null anymore).
loop

0
 

Author Comment

by:jjescri
ID: 7031645
The loop is this

Begin Loop
  if the socket is not NULL, close it.
  create a new socket
End loop
0
 
LVL 3

Expert Comment

by:cincin77
ID: 7032313
your OS?
this is related to maximum file descriptors you can open at one time...
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:jjescri
ID: 7032483
My OS is Linux Red Hat 7.3
0
 
LVL 3

Accepted Solution

by:
cincin77 earned 300 total points
ID: 7032662
write; sysctl -A
and check fs.super-max
it should be 256 for your machine
increase it by issuing following command:
echo XXXX > /proc/sys/fs/super-max
where XXXX is the max number you want

regards...

0
 
LVL 5

Expert Comment

by:BlackDiamond
ID: 7032939
Can you elaborate on what it is you want your logic to do, and post some real code. It doesn't make much sense to continuously open and close your sockets (which is what you have said you are doing) without some other code in there to do something with them while they are open.  It would really help us to help you if you can tell us what the application needs to do, and show us what your current socket code looks like.  I don't think you will get any helpful comments otherwise (we can only guess what you are trying to do).

Thanks,
BD
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

609 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