Or we change TCustomSocksWSocket.SetSocksLevel?

procedure TCustomSocksWSocket.SetSocksLevel(newValue : String);
begin
    if State <> wsClosed then begin
        RaiseException('Can''t change socks level if not closed');
        Exit;
    end;
    if newValue = '' then <==
        newValue := '5';  <==
....

Arno

Arno Garrels wrote:
> Guillaume MAISON wrote:
>> 
>> And, this is the strangest part, i have the ProcHttpSocketError which is
>> triggered, due to an exception which is in WSocket :
>> 
>> procedure TCustomSocksWSocket.SetSocksLevel(newValue : String);
>> begin
>>      if State <> wsClosed then begin
>>          RaiseException('Can''t change socks level if not closed');
>>          Exit;
>>      end;
>>      if (newValue <> '4')  and (newValue <> '5') and
>>         (newValue <> '4A') and (newValue <> '4a') then begin
>>          *This one is triggered* --> RaiseException('Invalid socks level.
>> Must be 4, 4A or 5.');
>>          Exit;
>>      end;
>>      FSocksLevel := UpperCase(newValue);
>> end;
>> 
>> And, effectively, the NewValue is '', as i don't need it....
>> 
> 
>> Arno Garrels a écrit :
>>> Guillaume MAISON wrote:
>>>> In that case, the property SocksLevel should be initialized at the
>>>> component creation with a value. Which is not the case in the
>>>> source code... As i've not changed my code...
>>> 
>>> Strange I don't have that problem. It is assigned default value '5'
>>> in both V5 and V6 see WSocket.pas and OverbyteIcsWSocket.
>>> 
>>> procedure TCustomSocksWSocket.AssignDefaultValue;
>>> begin
>>>     inherited AssignDefaultValue;
>>>     ...
>>>     FSocksLevel          := '5';
> 
>> 
>> Well, the problem comes from HttpProt (1768) in the
>> THttpCli.DoBeforeConnect procedure.
> 
> Yes, you are right, it probably needs to be set in THttpCli.Create
> to the value of FCtrlSocket.SocksLevel, could you find the difference
> between release and beta?
> 
> Arno
-- 
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

Reply via email to