[FFmpeg-devel] MinGW network support

Michel Bardiaux mbardiaux
Mon May 21 17:05:08 CEST 2007


Alex Beregszaszi wrote:
> Hi,
> 
>>> Correct explanation:
>>>
>>> winsock is that broken, that it returns socket numbers like 1700, 1803,
>>> 1850. Without any linearity, nor starting at 0/1.
>>>
>>> While FD_SETSIZE is set to a relative low number, this will cause the
>>> poll not to work with those socket numbers, thus ffserver wont work. 
>>>
>>> I know this is a bad hack, but winsock documentation itself prefers
>>> this. Lol.
>> FD sets are implemented as arrays of FD numbers in Winsock, not as bitmasks,
>> so actual FD numbers are irrelevant when using fd_set and FD_* macros.
>> Using an FD_SETSIZE of 32768 wastes 128k of memory, and it would be quite
>> slow if that many descriptors were actually used.
> 
> Without this hack, ffserver is not working. Can you give me an
> explanation why does Winsock returns socket numbers like 1754 and 1800?
> Can I influence this to return normal socket numbers starting from 3 ?
> 
I would venture the guess these are actual port numbers. It seems 
unlikely you can force socket() to return 'normal' values, because it is 
rather clear from the winsock documentation that sockets are *NOT* 
'files' but entities with their own API.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list