[Top][All Lists]

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

Re: [MingW] Multithreading applications do not work

From: Richard Frith-Macdonald
Subject: Re: [MingW] Multithreading applications do not work
Date: Tue, 24 Feb 2004 16:24:15 +0000

On 24 Feb 2004, at 16:16, Wim Oudshoorn wrote:

Richard Frith-Macdonald <address@hidden> writes:

Does windows support socketpair()?  Perhaps we could use a
socketpair to create connected sockets  instead of a pipe?

As far as I can tell NO.
(It is not in the winsock2.h file)

A pity.

Another idea ... clumsy, but should work I think ...

create a tcp/ip socket (A) on address with no port specified.
ask it for its port number.
set it listening.
create a new tcp/ip socket (B)
in a separate thread, connect from (B) to (A) producing a socket (C) in the main thread.
close socket (A)
use sockets (B) and (C)

reply via email to

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