Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-11 Thread brian
Hi, I checked it out, that's quite confusing heh. I'd appreciate it if you 
could show me a simple code for a UDP wsocket to Listen; and send data back 
to the host it received from.

Thanks! 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-11 Thread Wilfried Mestdagh
Hello Brian,

Not tested. This echo back a received packet from a listening UDP socket
to the other end:

var
   Buffer: array [0..1023] of char;
   Len: integer;
   Src: TSockAddrIn;
   SrcLen: integer;
begin
   SrcLen := SizeOf(Src);
   Len  := FUDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
   if Len  0 then
  Exit;
   Buffer[Len] := #0;
   
   // Echo packet back
   FUDPServer.SendTo(Src, SizeOf(Src), Buffer, Len);
   

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-11 Thread brian
Thanks, that's really helpful! (only missed the pointer to the buffer in 
that code)

it seems acknowledging every packet with udp before sending more turns out 
much slower than tcp 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TWSocket Stop Listening After Certain Numbers of Connected Clients.

2007-09-11 Thread Edward Koo
Hi,

I wrote a server with TWSocket that receive high speed
data and then push the data to connected clients. I
did some stress test recently and found that the
server will stop accepting client after it reach
something like 500-600 concurrent clients on Windows
XP and only about 180-200 on Windows Server 2003!?

Any client attempts to connect at this point will get
a socket error 10061, this happen even if all the
previous clients are disconnected. A breakpoint to the
code shows that SocketSessionAvailable will not
trigger anymore. It's like the server listening socket
is closed but I checked with Netstat -a and it shows
that the server is still listening to the designated
port.

I tried to change WSocket_listen backlog to 200 but it
won't help also. Any idea?


   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 
http://mobile.yahoo.com/go?refer=1GNXIC
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be