Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2003.01.27;
Скачать: [xml.tar.bz2];

Вниз

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

 
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;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.44 MB
Время: 0.01 c
4-87228
awenger
2002-12-14 06:16
2003.01.27
Как разорвать соединение с интернетом?


4-87210
dkDimon
2002-12-11 13:14
2003.01.27
Explorer crash


1-86770
123000
2003-01-17 18:19
2003.01.27
Работа с Clipboard oм


14-87061
Виталий
2003-01-08 14:49
2003.01.27
Общие вопросы


4-87209
Maksss
2002-12-12 16:56
2003.01.27
Help ! ! !





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский