Re: [twsocket] test multiple connections to the server

2016-05-11 Thread {Dark_Ducke}
the problem was another, the IP was only example I was opening the 2x
connection elsewhere, was lack of attention, thanks for the help!

2016-05-11 14:05 GMT-03:00 Wilfried Mestdagh :

> mSCK[I].Addr := '127.0.0.0';
>
> Is probably wrong. 127.0.0.0 is a network. I think you mean 127.0.0.1
>
> Met vriendelijke groeten,
> Wilfried Mestdagh
>
> Op 11-05-16 om 17:39 schreef {Dark_Ducke}:
>
>> Hello guys, I have an application server made with TWSocketServer that
>>
>> works very well to date. I'm trying to create a client application that
>> simulates multiple connections to the server, sending and receiving data,
>> I
>> tried to creating an array as follows:
>>
>>mSCK : Array of TWSocket;
>>
>>
>> begin
>>SetLength(mSCK, 10);
>>for I := 0 to 9 do
>>   begin
>> mSCK[I] := TWSocket.Create(nil);
>> mSCK[I].Proto:= 'tcp';
>> mSCK[I].Port := '4848';
>> mSCK[I].Addr := '127.0.0.0';
>> mSCK[I].LineMode := TRUE;
>> mSCK[I].LineEnd  := #13#10;
>> try
>>  mSCK[I].Connect;
>> except
>> end;
>>   end;
>> end;
>>
>>
>> bad I get the exception 'Connect Socket already in use'
>>
>> I'm doing something wrong? is there any way to make the tests you need?
>>
>> Thank you in advance!
>>
>
> --
> 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] test multiple connections to the server

2016-05-11 Thread Wilfried Mestdagh

mSCK[I].Addr := '127.0.0.0';

Is probably wrong. 127.0.0.0 is a network. I think you mean 127.0.0.1

Met vriendelijke groeten,
Wilfried Mestdagh

Op 11-05-16 om 17:39 schreef {Dark_Ducke}:

Hello guys, I have an application server made with TWSocketServer that
works very well to date. I'm trying to create a client application that
simulates multiple connections to the server, sending and receiving data, I
tried to creating an array as follows:

   mSCK : Array of TWSocket;


begin
   SetLength(mSCK, 10);
   for I := 0 to 9 do
  begin
mSCK[I] := TWSocket.Create(nil);
mSCK[I].Proto:= 'tcp';
mSCK[I].Port := '4848';
mSCK[I].Addr := '127.0.0.0';
mSCK[I].LineMode := TRUE;
mSCK[I].LineEnd  := #13#10;
try
 mSCK[I].Connect;
except
end;
  end;
end;


bad I get the exception 'Connect Socket already in use'

I'm doing something wrong? is there any way to make the tests you need?

Thank you in advance!


--
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] test multiple connections to the server

2016-05-11 Thread Wilfried Mestdagh

Wich is the offending line?

Met vriendelijke groeten,
Wilfried Mestdagh

Op 11-05-16 om 17:39 schreef {Dark_Ducke}:

Hello guys, I have an application server made with TWSocketServer that
works very well to date. I'm trying to create a client application that
simulates multiple connections to the server, sending and receiving data, I
tried to creating an array as follows:

   mSCK : Array of TWSocket;


begin
   SetLength(mSCK, 10);
   for I := 0 to 9 do
  begin
mSCK[I] := TWSocket.Create(nil);
mSCK[I].Proto:= 'tcp';
mSCK[I].Port := '4848';
mSCK[I].Addr := '127.0.0.0';
mSCK[I].LineMode := TRUE;
mSCK[I].LineEnd  := #13#10;
try
 mSCK[I].Connect;
except
end;
  end;
end;


bad I get the exception 'Connect Socket already in use'

I'm doing something wrong? is there any way to make the tests you need?

Thank you in advance!


--
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