comp.lang.ada
 help / color / mirror / Atom feed
* Using Check_Selector ...
@ 2005-03-01 10:49 mferracini
  2005-03-01 11:01 ` Duncan Sands
  0 siblings, 1 reply; 3+ messages in thread
From: mferracini @ 2005-03-01 10:49 UTC (permalink / 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?




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-01 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-01 10:49 Using Check_Selector mferracini
2005-03-01 11:01 ` Duncan Sands
2005-03-01 11:25   ` mferracini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox