From: "mferracini" <maurizio.ferracini@gmail.com>
Subject: Using Check_Selector ...
Date: 1 Mar 2005 02:49:11 -0800
Date: 2005-03-01T02:49:11-08:00 [thread overview]
Message-ID: <1109674151.141839.96860@l41g2000cwc.googlegroups.com> (raw)
an other litte problem with non-blocking socket....
here the code
server:
-------------------------------
........
Accept_Socket (Server, Socket, Address);
Ada.Text_Io.Put_Line ("new connection");
Set(Rset, Socket);
Create_Selector(Selector);
begin
loop
Check_Selector(Selector, Rset, Wset, Status, 0.5);
if (Status /= Expired ) then
Receive_Socket(Socket,Message,Last);
Ada.Text_Io.Put_Line("read something");
else
Ada.Text_Io.Put(".");
end if;
end loop;
end;
-------------------------------
client:
-------------------------------
.........
loop
Buffer(1):=42;
Send_Socket(Handle,Buffer,Sk_Last);
Ada.Text_Io.Put_Line("OK");
delay(1.0);
end loop;
-------------------------------
the problem is : when programs start, the server read only the first
time.
---
new connection
read someting
............................................................
--
an hint?
next reply other threads:[~2005-03-01 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-01 10:49 mferracini [this message]
2005-03-01 11:01 ` Using Check_Selector Duncan Sands
2005-03-01 11:25 ` mferracini
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox