Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: setup and deployment with MDB files Pin
31-Oct-03 6:31
suss31-Oct-03 6:31 
GeneralRe: setup and deployment with MDB files Pin
Member 44190931-Oct-03 6:52
Member 44190931-Oct-03 6:52 
Generalwindows service and SQL related problem Pin
rishikt31-Oct-03 3:50
rishikt31-Oct-03 3:50 
GeneralRe: windows service and SQL related problem Pin
Heath Stewart31-Oct-03 4:42
protectorHeath Stewart31-Oct-03 4:42 
GeneralRe: windows service and SQL related problem Pin
Terry Denham31-Oct-03 5:25
Terry Denham31-Oct-03 5:25 
GeneralRe: windows service and SQL related problem Pin
Blake Coverett31-Oct-03 7:36
Blake Coverett31-Oct-03 7:36 
Generalmulti thread question Pin
rod termaat31-Oct-03 3:38
rod termaat31-Oct-03 3:38 
GeneralRe: multi thread question Pin
Heath Stewart31-Oct-03 4:35
protectorHeath Stewart31-Oct-03 4:35 
I'm not sure I follow what you mean by threading. First, you mention a case where you want clients processed in multiple threads, but then you mention a single client processing multiple chunks of data. Could you elaborate a little on which you mean?

As far as handling multiple connections, there are a slew of articles here on CP about that so, unless necessary, I won't bog-down the forums with code.

If you want to handle multiple data chunks in a single transaction, think about how several protocols like HTTP deal with it: content-length. You should specify a protocol where the content-length is a fixed size, like a long. That gives the number of raw bytes to read. Read that many bytes. If data exists after that, assume it was another content-length. Keep doing the same thing. Of course, you'll want to check the input data to make sure the protocol was use correctly. This is pretty common in a lot of different things.

You can send and receive on the same socket in a connection protocol. There's some other stuff that has to be done with connectionless protocols since they send datagrams with no return.

As far as leaving the connection open, it really depends on the persistence of communication. If the transactions happen in intervals, you could get away with leaving the connection open. If they transactions are random or you're unsure if another transaction will occur, close the connection.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: multi thread question Pin
Blake Coverett31-Oct-03 8:04
Blake Coverett31-Oct-03 8:04 
GeneralCOM Interop - objects cause NullReferenceExceptions at random Pin
Corinna John31-Oct-03 2:39
Corinna John31-Oct-03 2:39 
GeneralRe: COM Interop - objects cause NullReferenceExceptions at random Pin
Heath Stewart31-Oct-03 5:22
protectorHeath Stewart31-Oct-03 5:22 
Generalnoob winform question Pin
R. Thomas31-Oct-03 1:37
R. Thomas31-Oct-03 1:37 
GeneralRe: noob winform question Pin
Daniel Turini31-Oct-03 2:20
Daniel Turini31-Oct-03 2:20 
GeneralRe: noob winform question Pin
R. Thomas31-Oct-03 4:08
R. Thomas31-Oct-03 4:08 
General(null) values in datagrid Pin
misiek31-Oct-03 0:30
misiek31-Oct-03 0:30 
GeneralRe: (null) values in datagrid Pin
Daniel Turini31-Oct-03 2:18
Daniel Turini31-Oct-03 2:18 
GeneralRe: (null) values in datagrid Pin
misiek31-Oct-03 2:59
misiek31-Oct-03 2:59 
GeneralRe: (null) values in datagrid Pin
Braulio Dez31-Oct-03 2:59
Braulio Dez31-Oct-03 2:59 
GeneralCrystal Export to Excel Pin
akorolev1030-Oct-03 20:17
akorolev1030-Oct-03 20:17 
GeneralWritng objects to file Pin
Itanium30-Oct-03 18:34
Itanium30-Oct-03 18:34 
GeneralRe: Writng objects to file Pin
MKlucher30-Oct-03 19:08
MKlucher30-Oct-03 19:08 
GeneralRe: Writing objects to file Pin
Itanium30-Oct-03 19:43
Itanium30-Oct-03 19:43 
GeneralRe: Writng objects to file Pin
Corinna John30-Oct-03 19:50
Corinna John30-Oct-03 19:50 
GeneralRe: Writng objects to file Pin
Itanium30-Oct-03 21:44
Itanium30-Oct-03 21:44 
GeneralCommand Bars Pin
monrobot1330-Oct-03 17:37
monrobot1330-Oct-03 17:37 

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.