Click here to Skip to main content
14,866,582 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I add web socket listener to compatible app wit extension, I am receive URL video but when I call NewVideoDownload() the form of download video freeze Minute then dispose, how i resolve this problem?
MyDownloader: A Multi-thread C# Segmented Download Manager[^]

What I have tried:

I make event handler and it send data correctly but when i call video downloader form its show freezes, I wrote the Handler in more than one way but problem still.
Updated 12-Jan-19 1:04am

A socket listener does just that: listens to a socket port until it gets given something to do via a connection from an external device.
If you create a Socket Listener in your UI code (as a result of a button press for example) then it will sit and wait for a connection and your GUI thread will be unable to do anything else until that connection is established.

Without being able to see exactly the code you used and how you used it, I'm guessing that is exactly what you have done.
Don't do it like that: that's like taking a call on your phone while you are driving: your attention is on the phone and you fail to respond to traffic around you until you crash.

If you want to set up a socket listener, you need to ensure that it is contained in a separate thread: the name of the article you link to implies it will show you how to do that...
Member 14062044 12-Jan-19 7:47am
No, not as you say.
I open port and start socket in individual class and still listener in background, my app work correctly, when receive link from websocket, I can print data received and parameter it to download form, form freeze but all method in done and see result in log debug. -clipboard work correctly-.

I print test word after receive data and show freeze form it printed when form displayed.
Take a look at these video downloaders on GitHub: Topic: youtube-downloader · GitHub[^]
Member 14062044 12-Jan-19 7:50am
I take app in question link and edit it completely in download from all social media

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900