Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.01.27;
Скачать: CL | DM;

Вниз

Мастера, подскажите   Найти похожие ветки 

 
boolean   (2002-11-30 14:38) [0]

Как найти свободный порт из диапазона? Допустим с 1000 по 10000


 
Digitman ©   (2002-11-30 14:46) [1]

см. bind()

If an application does not care what local address is assigned to it, it can specify the manifest constant value ADDR_ANY for the sa_data field of the name parameter. This allows the underlying service provider to use any appropriate network address, potentially simplifying application programming in the presence of multihomed hosts (that is, hosts that have more than one network interface and address). For TCP/IP, if the port is specified as zero, the service provider will assign a unique port to the application with a value between 1024 and 5000. The application can use getsockname after bind to learn the address and the port that has been assigned to it, but note that if the Internet address is equal to INADDR_ANY, getsockname will not necessarily be able to supply the address until the socket is connected, since several addresses can be valid if the host is multihomed.



Страницы: 1 вся ветка

Текущий архив: 2003.01.27;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.019 c
7-87152
Sergey_MV
2002-11-14 14:06
2003.01.27
Момент завершения работы винды?


1-86784
БД
2003-01-18 08:25
2003.01.27
Plese help me now!


1-86956
Igit
2003-01-17 10:08
2003.01.27
Загрузка картинки в Imageshow


1-86946
Smok_er
2003-01-17 01:02
2003.01.27
А как отправить окну сообщение о том,


1-86887
Grrey
2003-01-16 10:52
2003.01.27
MDIChild в DLL