(PART 1)
I feel that a little background is in order. I have an industrial controller programming background.
I am self-taught in VB6. I am now stepping into .NET with VB2010Express.
I have just finished Cornell & Morrison Programming VB.Net: a guide for experienced programmers 2002 ( a bit old, but I wanted some background)
I am now reading my second VB.NET book Kimmel VB.Net Power Coding.
I am referencing these books because I am not afraid of independent learning. I do not wish to be spoonfed this stuff.
I am having some mental sticking points. I have an existing Vb6 app that I want to rewrite in VB.NET.
I have some basic understanding of the topics involved in this project: multithreading, events, callbacks, delegates and socket connections.
I am posting this thread to get help in determining WHERE to begin. I wrote some vb.net code that does the job most of the time!
The project fails from lack of multithreading understanding and (I think) lifetime of the socket connection.
-- 8 times out of 10, the project works as intended.
Occasionally I see the following
System.Net.Sockets.SocketException A blocking operation was interrupted by a call to WSACancelBlockingCall
System.Net.Sockets.SocketException A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
A few times I saw an exception concerning a Disposed object(?)
I am not seeking help for this now. That will be another thread -- later. The errors tell me that my understanding is lacking.
What I request help is more basic than coding help. I need help to determine:
functionality of a class or classes -- what should be in which class? --------------------Currently I have only a Form1 Class
should the UI spawn threads -- (Does my project's activities justify threads?-------------Currently I have 25 threads
what part of a project should initiate connections -- How many connections do I need?--Currently each thread makes 1 connection each.
EDIT:
Experimentation indicates that ONE background thread will suffice -- Will complete in 1.027 seconds
This should also alleviate the exceptions noted above.
Also, ONE connection, just let the single thread keep using it!
I feel that a little background is in order. I have an industrial controller programming background.
I am self-taught in VB6. I am now stepping into .NET with VB2010Express.
I have just finished Cornell & Morrison Programming VB.Net: a guide for experienced programmers 2002 ( a bit old, but I wanted some background)
I am now reading my second VB.NET book Kimmel VB.Net Power Coding.
I am referencing these books because I am not afraid of independent learning. I do not wish to be spoonfed this stuff.
I am having some mental sticking points. I have an existing Vb6 app that I want to rewrite in VB.NET.
I have some basic understanding of the topics involved in this project: multithreading, events, callbacks, delegates and socket connections.
I am posting this thread to get help in determining WHERE to begin. I wrote some vb.net code that does the job most of the time!
The project fails from lack of multithreading understanding and (I think) lifetime of the socket connection.
-- 8 times out of 10, the project works as intended.
Occasionally I see the following
System.Net.Sockets.SocketException A blocking operation was interrupted by a call to WSACancelBlockingCall
System.Net.Sockets.SocketException A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
A few times I saw an exception concerning a Disposed object(?)
I am not seeking help for this now. That will be another thread -- later. The errors tell me that my understanding is lacking.
What I request help is more basic than coding help. I need help to determine:
functionality of a class or classes -- what should be in which class? --------------------Currently I have only a Form1 Class
should the UI spawn threads -- (Does my project's activities justify threads?-------------Currently I have 25 threads
what part of a project should initiate connections -- How many connections do I need?--Currently each thread makes 1 connection each.
EDIT:
Experimentation indicates that ONE background thread will suffice -- Will complete in 1.027 seconds
This should also alleviate the exceptions noted above.
Also, ONE connection, just let the single thread keep using it!