Re: [twsocket] Proxy traversal error handling

2011-02-11 Thread Anton S.
>however with socks "#20xxx is not a winsock error"
>is displayed everywhere with socks errors
What's the problem? ICS uses custom WSocketErrorDesc anyway so just add a 
definition of socks errors there.

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


[twsocket] Send and Shutdown oddity

2011-02-11 Thread Markus Humm
Hello,

I'm using TSWocket and have the following problem:

One client and one server running on the same PC (localhost, 127.0.0.1)
use the socket as medium to transport commands.

It normally works as it should but under certain conditions it fails
like this: my application has to deal with Bluetooth as well and in my
special case here the Toshiba Bluetooth stack. I can detect the remote
device, pair it etc. and then my setup wizard willl be finished by the
user clicking a button.

My application now has to tell the communication part (means the server
side of the TWSocket connection) to shut down. it sends him a binary
shutdown command and after a short time the client does a shutdown(1) on
the socket.

The server is bound to a message processing thread and multithreaded is
set to true. Binding is done via ThreadAttach in the execute method of
the thread.

In the error case the server doesn't receive the shutdown command send
by the client, but he eventually gets the closure of the socket.
Depennding on ym application logic it sort of hangs in the air then.

One thought was that the shutdown(1) call of the client sort of
overtakes the send call, but a sleep(1000) directly after the send or a
3 sek long message processing loop directly after the send call didn't
help, so I'm no longer really convinced that this short time between
those two actions is the cause.

On the server side I've hooked into OnChangeState but the only thing
this one sees in those cases is the latter wsClosed state.

But it fails more often in my perception than it works...and my other
perception is, that it only happens when the Toshiba stack is involved,
but  can't easily check this, as this laptop is the only Toshiba Stack
device I own.

Greetings

Markus
--
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] Proxy traversal error handling

2011-02-11 Thread Arno Garrels
Anton S. wrote:
>> however with socks "#20xxx is not a winsock error"
>> is displayed everywhere with socks errors
> What's the problem? ICS uses custom WSocketErrorDesc anyway so just
> add a definition of socks errors there.

There should be multiple new functions to lookup error messages IMO.
One of them could lookup all types of errors, I won't add that to 
WSocketErrorDesc. Will commit my local changes within the next days.

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


[twsocket] TFtpCli strange logic

2011-02-11 Thread Arno Garrels
Hi,

1) Command Open succeeds.
2) After the server received command User it closes the connection (FIN/ACK).
3) OnSessionClosed triggers with ErrCode 0.
4) OnRequestDone triggers with ErrCode 0 and the status code from previous 
request.

Would you agree that is a bug?

-- 
Arno Garrels

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