Open GoogleCodeExporter opened 8 years ago
Im using my mobile phone right now so i cant test this but, why do you need to
close
the connection?
If the user is not granted a access the connection is closed.
If the connection is inactive in X seconds it is closed.
Original comment by blomman84
on 17 Mar 2009 at 9:53
I need this to make pause for download.
Original comment by hackw...@gmail.com
on 18 Mar 2009 at 2:27
If you set a break point on: this.ConnectionStatusChange(this, new
FmdcEventArgs(Disconnected, new FmdcException(msg)));
in function TcpConnection:Disconnect(string msg)
and on the line: socket.Disconnect(true);
Do you get to the second line when calling
TransferManager.EndTransfer(ITransfer trans)?
Original comment by blomman84
on 29 Mar 2009 at 7:21
application locks on line socket.Disconnect(true); in this function.
this.ConnectionStatusChange(this, new
FmdcEventArgs(Disconnected, new FmdcException(msg))); runs quickly
Original comment by hackw...@gmail.com
on 30 Mar 2009 at 1:34
Solved by adding into void Disconnect(string msg) (TcpConnection.cs) following
line
socket.Shutdown(SocketShutdown.Both);
before socket.Disconnect(true);
Original comment by hackw...@gmail.com
on 30 Mar 2009 at 7:00
What happens if you have this instead?
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger,new
LingerOption(false, 0));
socket.Disconnect(false);
Original comment by blomman84
on 31 Mar 2009 at 9:45
[deleted comment]
socket.Disconnect(false); still locking application
if I use
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger,
new
LingerOption(false, 0));
this works.
Original comment by hackw...@gmail.com
on 1 Apr 2009 at 2:31
what?
Does it or does it not work with those 2 lines?
Original comment by blomman84
on 1 Apr 2009 at 4:42
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger,
new
LingerOption(false, 0));
socket.Disconnect(false); - this works
next 2 lines block application
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger,new
LingerOption(false, 0));
socket.Disconnect(false);
If i use last 2 lines i cant resume connection after disconnect, it works only
if
use Shutdown
Original comment by hackw...@gmail.com
on 1 Apr 2009 at 4:45
ooh...
It should ofcourse be SocketOptionName.DontLinger and not
SocketOptionName.Linger,
thanks :)
I have also changed back the socket.Disconnect(false) to
socket.Disconnect(true).
I have commit it to svn :)
Still works?
But i dont understand why you want to resume connection.
If you use TransferManager.EndTransfer() you should not resume a connection.
You should start a new one.
When calling EndTransfer. That transfer is removed from TransferManagers
collection
of known transfers.
Original comment by blomman84
on 1 Apr 2009 at 4:59
You right i'm trying to create new conncection, it connects to user but dont
downloading something in this case.
Original comment by hackw...@gmail.com
on 1 Apr 2009 at 5:01
I have checked it. Now it dont lock application. But if I start new transfer
after
that downloads dont starts.
Original comment by hackw...@gmail.com
on 1 Apr 2009 at 5:09
Original comment by blomman84
on 9 Apr 2009 at 5:10
Some times when stopping download from 10-20 sources it throws
NullReferenceException in TcpConnection.cs on line
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger,
new
LingerOption(false, 0));
but all values including socket is not null
Original comment by hackw...@gmail.com
on 10 Apr 2009 at 2:48
"But if I start new transfer after that downloads dont starts."
What message do you get on the disconnect event?
"but all values including socket is not null"
strange. Do you have complete exception info?
Original comment by blomman84
on 13 Apr 2009 at 9:17
After last changes, if download 3 files each from ~20 sources I got exception
on
line socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.DontLinger,
new
LingerOption(false, 0));
where socket is null
Original comment by hackw...@gmail.com
on 17 Apr 2009 at 8:36
"What message do you get on the disconnect event?" how i can get this message?
flowlib establish connection but dont downloading something. I see it from
StrongDC
transfermanager.
Original comment by hackw...@gmail.com
on 17 Apr 2009 at 8:55
After cancelling and following calling StartTransfer all sockets being
disconnected
from next line in TcpConnection.cs OnRecieveData:
// If no data was recieved then the connection is probably dead
// Change Connection Status
this.ConnectionStatusChange(this, new FmdcEventArgs(Disconnected));
this line cancels all segments
Original comment by hackw...@gmail.com
on 13 May 2009 at 7:17
why TcpConnection trys to reuse socket after disconnecting?
Original comment by hackw...@gmail.com
on 13 May 2009 at 7:28
fresh news, socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.DontLinger, new
LingerOption(false, 0)); always throws exception optionValue is incorrect
Original comment by hackw...@gmail.com
on 13 May 2009 at 9:22
for now I'm using
{{{
e.DisconnectReuseSocket = true;
if(socket!=null)
socket.DisconnectAsync(e);
}}}
without SetSocketOption
It's appear to work.
Original comment by hackw...@gmail.com
on 19 May 2009 at 1:09
Original issue reported on code.google.com by
hackw...@gmail.com
on 17 Mar 2009 at 7:51