[twsocket] UDP and TCP on same socket - problem on WS2008 and W7

2012-07-20 Thread Stephen Dickason
Hi.

I'm trying to set up a program that will discover and communicate with peer 
instances on a local network. Ideally listening on a single port number.

Setup: ICSv6 - modified ICSTCPSrv sample program in Turbo Delphi.

The code seems to work fine on my XP machine - it picks up its own UDP 
broadcasts and can pick up UDP broadcasts from a W7 machine and doesn't display 
any error messages when setting up the TWSocketServer for the TCP listener and 
TWSocket for the UDP listener (and another TWSocket to do the client send).

On starting on either a Windows Server 2008 R2 Standard or Windows 7 machine, 
it comes up with an error message: Address not available (#10049 in 
setsockopt(IP_ADD_MEMBERSHIP)).

I've set the MultiCast and ReuseAddr properties to true on the listeners.

What have I missed to get it working on the other windows versions?

TIA
Stephen

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


Re: [twsocket] [SPAM] SSL Server problem with network congestion

2012-07-20 Thread Gabriele S.

an update.

It should not change anything but when I set logging of SSL with the 
parameter loSSLinfo the problem is greatly reduced ... but not eliminated


Developing in Delphi 7 and ics v7

- Original Message - 
From: Gabriele S. gabriel...@intrapresa-it.it

To: twsocket@elists.org
Sent: Wednesday, July 18, 2012 10:43 AM
Subject: [SPAM] [twsocket] SSL Server problem with network congestion


I have a problem with the component TSslWSocketServer and a comuincation 
with more clients(socket developed in C++).
I used the demo SSLSimpleServer for the connection and handshake SSLV3 and 
certificate self signed with authentication server side and it work fine.

When a client connect I run a thread with DataAvailable and more function.
The problem is the send data (string or byte) in this thread.

I use this code in the thriggered function where Client is TWSocketClient 
and the ClientClass on SSLServer is TSslWSocketClient


self.Client.SendStr(buff);

sleep(100);

   while not self.Client.AllSent do
  begin
   Appendlog('','thread ' + inttostr(nthread) + ' 
waiting');

   inc(a);

   sleep(400);

   if a  10 then
 begin
Appendlog('','thread ' + inttostr(nthread) + ' 
ERROR SEND);

break;
 end;
  end;

This work fine but if the network is congested the comunication RANDOM not 
work(1 time of 10). The server buffer is not empty and AllSent is ever 
false.
I tryed to flush the object Client  (Client.flush) and send again the data 
but not work, AllSent is again ever false.
For restart the comunication I need to close the connection and reconnect 
with ssl.

The client not receive nothing and get a timeout.
All this only if network is used or congested.
The object does not return any error on events.
I just tryed every configuration in the TWSocketClient (Keepalive, 
buffersize ...)


Sorry form my very bad english :)

Gabriele

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


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


Re: [twsocket] UDP and TCP on same socket - problem on WS2008 and W7

2012-07-20 Thread Angus Robertson - Magenta Systems Ltd
 On starting on either a Windows Server 2008 R2 Standard or Windows 
 7 machine, it comes up with an error message: Address not available 
 (#10049 in setsockopt(IP_ADD_MEMBERSHIP)).

MSDN says: 

IP_ADD_MEMBERSHIP - WSAEADDRNOTAVAIL -  Do not call IP_ADD_MEMBERSHIP with
the same group more than once on the same network interface.

so maybe you can not multicast on UDP and TCP at the same time on the
same IP.

Angus

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