help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-smalltalk] RE: MinGW patch


From: Akeroyd, FA \(Freddie\)
Subject: RE: [Help-smalltalk] RE: MinGW patch
Date: Thu, 5 Jul 2007 15:10:34 +0100

> > Socket support on windows may need a bit more work as descriptors
> > returned by socket() and fd's returned by open() can, in principle,
> > clash.

> I'm not sure this is true -- on Unix, they are the same `beast' and,
on 
> Windows, we can...

> > use _open_osfhandle() and related functions to allocate a C RTL file

> > descriptor to work with.

Yes, _open_osfhandle() will generate a unique number for you. When I
said "clash" I was only referring to the initial numbers returned by
socket() and open() which can overlap.

> While other functions will not work, we can have wrappers 
> on recvfrom/sendto that unbox the Windows handle and call the 
> winsock function.

That seems a good approach and should work fine as GNU Smalltalk keeps
socket descriptors and file descriptors separate as you mentioned. I
will try to have a play with it, time permitting, over the next few
weeks.

Thanks for all your help with the MinGW porting and have a good trip to
Montreal

Freddie





reply via email to

[Prev in Thread] Current Thread [Next in Thread]