Hello, Siddharth!
S> Hello friends,
S> I am having a problem in transferring a file from a client to
S> another client via a server, with the help of SOCKETS. I am using
S> NETWORK STREAM to tranfer the file contents. As soon as the file is
S> sended to the SERVER's SOCKET, it shows an error of : "CONNECTION
S> FORCIBLY CLOSED". Please help me out. I need to submit it as a FINAL
S> YEAR PROJECT, in my INSTANT MESSENGER.
Maybe server expects the data in special format defined by the protocol?
Do you use any application protocol for file sending?
If you use .NET 2.0 you can use Socket.SendFile method
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Siddharth - 15 Feb 2006 06:30 GMT
>Hello, Siddharth!
>
[quoted text clipped - 14 lines]
>Regards, Vadym Stetsyak
>www: http://vadmyst.blogspot.com
Thanks for the concern in my problem. I am using .NET 1.1 and I wanted to get
a solution which is compatible in this version. I would be obliged if you can
help me out.
I am developing an Instant messenger in C#. I have developed the Text
Messenger in the form of two different applications for : Client and the
Server. I wanted to add the facility of Voice and Video Chatting to it. I
have developed a separate application for Capturing the Voice and Video
through a Microphone and a Web Camera that saves it as a file.
I wanted to integrate this application into the Client App. to incorporate
the facility of Voice transfer in the form of a File.
The problem that I am facing is that, As soon as I transfer the file in the
form of NETWORK STREAM, it throws an exception that "CONNECTION FORCIBLY
CLOSED". I would be highly Obliged if I get this problem solved.
Vadym Stetsyak - 15 Feb 2006 11:04 GMT
Hello, Siddharth!
If you have the access to Server code then you can change its behavior not to close connection. How server determines that a file is being send to it?
Also I would recommend instead of saving info to the file and then sending, you can send retrieved visual and sound data at once ( on the fly ).
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Siddharth - 03 Apr 2006 11:09 GMT
Server does not closes the connection, instead there arises an exception -
"FORCIBLY CLOSED THE CONNECTION ON REMOTE HOST". I have even used the Visual
Studio 2005 and the sendFile( ) Method, but still I am unable to transfer the
File.
I am unable to parse the captured data in real time so as to incorporate
the ON THE FLY transfer. I would be highly obliged if you help me out in it,
as it really sounds a more efficient approach.