Click here to Skip to main content
13,834,683 members
Rate this:
 
Please Sign up or sign in to vote.
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.
Posted
Updated 12-Jan-19 2:04am
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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...
   
Comments
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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Take a look at these video downloaders on GitHub: Topic: youtube-downloader · GitHub[^]
   
Comments
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190114.1 | Last Updated 12 Jan 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100