Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page: previous  1  2  3  4  5  6  7 
Avatar
Jabberer #91
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1569
Please try to understand the basics how SOCKS 5 filetransfer is working from reading the XEP at:
http://www.xmpp.org/extensions/xep-0065.html

if both clients can't setup a socket to each other, then you need a file transfer proxy in the middle.
This is why the example is using proxy.ag-software.de. This is our proxy which should be used for testing only. And there is no guarantue that our proxy is working correctly all the time.

You can't setup a direct socket connection when:
  • One of the clients runs a firewall which blocks incoming or outgoing connections
  • One or both of the clients are behind NAT (router)

Does it work for you if both clients are in the same internal network (subnet)?
Software Developer
AG-Software
Avatar
yeawsing #92
Member since Jul 2006 · 33 posts · Location: South Korea
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1569
Subject: SocketException
Can anyone tell me what should I do.

When Initiator send file and the Target accept it.  In the middle of transfering, the Target close the file transfer.
The initiator receive the _socket_OnDisconnect.

But strangely, it still go to the Sendfile function and do the BeginSend.

I have use the SockeException to catch this Exception and simply just give it a return statement.
My question is how can I stop it going to the SendFile function again after receiving the _socket_OnDisconnect event?

Error:10053 <--- this error code is right, because the remote end has disconnect it.
System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.BeginSend(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
   at frmFileTransfer.SendFile(IAsyncResult ar) in frmFileTransfer.cs:line 535

YS
I am still learning..., hope I can contribute back.
YS
Avatar
Alex #93
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
cancelling a file transfer is not completly implemented in our example code.
If you get a disconnect then you should exit the "Send Loop" and shutdown the filetransfer.

Alex
Avatar
Michael.ly #94
Member since Oct 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #91
Quote by Jabberer:
You can't setup a direct socket connection when:
  • One of the clients runs a firewall which blocks incoming or outgoing connections
  • One or both of the clients are behind NAT (router)

Does it work for you if both clients are in the same internal network (subnet)?

I Replace proxy for 'proxy.jabber.org' or 'proxy.ag-software.de' ,
it's work very good for me if both clients are in the same internal network (subnet).
but it doesn't work if one client is in the internal network and one client is in the external network.

--Now:--
My firewall of the external network agsXmpp server is open port with '5222' and '5223' and '5269' and '7777',
my internal netword don't setup NAT.

--Question:--
how setup about firewall ?
how setup about NAT if internal network or external network have NAT?
I'm working on it
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2  3  4  5  6  7 
Forum: agsXMPP RSS