Click here to Skip to main content
15,905,073 members
Home / Discussions / C#
   

C#

 
GeneralRe: error 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 4:22
Emmet_Brown27-Oct-09 4:22 
AnswerRe: error 26: SQL server locating error Pin
Covean27-Oct-09 4:25
Covean27-Oct-09 4:25 
AnswerRe: error 26: SQL server locating error Pin
Eddy Vluggen27-Oct-09 4:27
professionalEddy Vluggen27-Oct-09 4:27 
GeneralRe: error 26: SQL server locating error Pin
Emmet_Brown27-Oct-09 4:35
Emmet_Brown27-Oct-09 4:35 
GeneralRe: error 26: SQL server locating error Pin
Eddy Vluggen27-Oct-09 8:18
professionalEddy Vluggen27-Oct-09 8:18 
QuestionProblem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
chirag_chauhan27-Oct-09 2:56
chirag_chauhan27-Oct-09 2:56 
AnswerRe: Problem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
ragnaroknrol27-Oct-09 4:04
ragnaroknrol27-Oct-09 4:04 
GeneralRe: Problem in accessing files from one virtual directory to second virtual directory on GoDaddy Pin
chirag_chauhan27-Oct-09 15:26
chirag_chauhan27-Oct-09 15:26 
QuestionWhich HTML element under mouse cursor in WebBrowser control? Pin
tanton-gaston27-Oct-09 2:22
tanton-gaston27-Oct-09 2:22 
AnswerRe: Which HTML element under mouse cursor in WebBrowser control? Pin
Henry Minute27-Oct-09 3:30
Henry Minute27-Oct-09 3:30 
QuestionProblem wth datagrid [modified] Pin
Sider8927-Oct-09 2:15
Sider8927-Oct-09 2:15 
AnswerRe: Problem wth datagrid Pin
dan!sh 27-Oct-09 2:21
professional dan!sh 27-Oct-09 2:21 
GeneralRe: Problem wth datagrid Pin
Sider8927-Oct-09 2:26
Sider8927-Oct-09 2:26 
GeneralRe: Problem wth datagrid Pin
dan!sh 27-Oct-09 2:33
professional dan!sh 27-Oct-09 2:33 
GeneralRe: Problem wth datagrid Pin
Sider8927-Oct-09 4:06
Sider8927-Oct-09 4:06 
QuestionHow to plug/unplug USB serial port problematically? Pin
pallaka27-Oct-09 2:09
pallaka27-Oct-09 2:09 
AnswerDo not cross post Pin
dan!sh 27-Oct-09 2:13
professional dan!sh 27-Oct-09 2:13 
GeneralRe: Do not cross post Pin
pallaka27-Oct-09 3:03
pallaka27-Oct-09 3:03 
GeneralRe: Do not cross post Pin
Not Active27-Oct-09 3:08
mentorNot Active27-Oct-09 3:08 
AnswerRe: How to plug/unplug USB serial port problematically? Pin
anishkannan27-Oct-09 8:36
anishkannan27-Oct-09 8:36 
Questioncrystal report error Pin
indenturetech27-Oct-09 2:01
indenturetech27-Oct-09 2:01 
QuestionAsynchronous Sockets Pin
joana.simoes27-Oct-09 1:44
joana.simoes27-Oct-09 1:44 
AnswerRe: Asynchronous Sockets Pin
Paulo Zemek27-Oct-09 3:04
Paulo Zemek27-Oct-09 3:04 
I didn't debug the code, but I see you used a lot of async calls. Do you really need that much of async calls?

I will explain: If I am not wrong, every async call will use a ThreadPool thread. So, on the first callback you will be in a thread-pool thread (instead of the main one). Generating a new async callback will only use a new Thread to do the parallel work, for something that is already in parallel.

So, maybe you can simplify everything simple doing everything "sinchronously" inside a ThreadPool thread, by using a ThreadPool.QueueUserWorkItem. I think this way the code will get more readable, you will make it work and also will be faster, as it will use only one thread instead of 3 or 4 threads to finish the work.

Also, for the read (not the write) note that you may ask to read 100 bytes and the read can read 3 bytes and return 3. This way, if you REALLY need that 100 bytes, you will need to call read again, as many times as needed or even throw an exception if the connection is closed before it finishes.
GeneralRe: Asynchronous Sockets Pin
joana.simoes28-Oct-09 7:28
joana.simoes28-Oct-09 7:28 
AnswerRe: Asynchronous Sockets Pin
Jimmanuel27-Oct-09 5:00
Jimmanuel27-Oct-09 5:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.