Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
QuestionCannot convert from system...IList<class> to class[]</class> Pin
Sevententh2-Oct-09 4:09
Sevententh2-Oct-09 4:09 
AnswerRe: Cannot convert from system...IList to class[] Pin
Keith Barrow2-Oct-09 4:19
professionalKeith Barrow2-Oct-09 4:19 
GeneralRe: Cannot convert from system...IList to class[] Pin
Sevententh5-Oct-09 23:27
Sevententh5-Oct-09 23:27 
QuestionOdd behaviour when selecting item in a Combobox [Fixed it, my fault] Pin
Anthony Mushrow2-Oct-09 4:07
professionalAnthony Mushrow2-Oct-09 4:07 
QuestionC# TCP networkstreem problem Pin
Titok Levi2-Oct-09 2:32
Titok Levi2-Oct-09 2:32 
AnswerRe: C# TCP networkstreem problem Pin
Luc Pattyn2-Oct-09 3:06
sitebuilderLuc Pattyn2-Oct-09 3:06 
AnswerRe: C# TCP networkstreem problem Pin
0x3c02-Oct-09 3:56
0x3c02-Oct-09 3:56 
AnswerRe: C# TCP networkstreem problem Pin
Tr@v2-Oct-09 16:26
Tr@v2-Oct-09 16:26 
Luc is leading you in the right direction. In my job we do lots of serial and TCP/IP connection between PC's and various devices. We use both methods he suggests but more often than not the protocols we develop have some start character and stop character to delineate the message. The characters that are meant for this purpose are hex 0x02<stx>(send transmission) and hex 0x03<etx>(end transmission). These characters work well as neither are printable characters so it is unlikely that you would be sending them in a normal message. If you really want to get picky and guarantee that the data you receive is the same as the data you sent you should be using some form of error checking such as cyclic redundancy check. If you want to do error checking I would recommend using the send/acknowledge system so that your client can let the server know if it got good data and if not it can send a negative acknowledgement to let the server know it needs to resend the data.

If you always know how many bytes you are expecting you can always just read that many bytes out of your receive buffer and process them, then go back and read more bytes etc... this might be a simpler solution if you don't want to build some sort of protocol, just be sure that your buffer size is large enough that it won't overflow.
GeneralRe: C# TCP networkstreem problem Pin
Titok Levi6-Oct-09 22:03
Titok Levi6-Oct-09 22:03 
QuestionGenerics, delegates and type inference Pin
dojohansen2-Oct-09 2:10
dojohansen2-Oct-09 2:10 
AnswerRe: Generics, delegates and type inference Pin
Gideon Engelberth2-Oct-09 6:29
Gideon Engelberth2-Oct-09 6:29 
GeneralRe: Generics, delegates and type inference Pin
dojohansen2-Oct-09 7:43
dojohansen2-Oct-09 7:43 
GeneralRe: Generics, delegates and type inference Pin
Gideon Engelberth2-Oct-09 13:00
Gideon Engelberth2-Oct-09 13:00 
QuestionInheritance question Pin
xkrja1-Oct-09 23:35
xkrja1-Oct-09 23:35 
AnswerRe: Inheritance question Pin
stancrm1-Oct-09 23:49
stancrm1-Oct-09 23:49 
GeneralRe: Inheritance question Pin
xkrja2-Oct-09 0:22
xkrja2-Oct-09 0:22 
GeneralRe: Inheritance question Pin
Mirko19802-Oct-09 0:57
Mirko19802-Oct-09 0:57 
AnswerRe: Inheritance question Pin
Christian Graus2-Oct-09 0:40
protectorChristian Graus2-Oct-09 0:40 
AnswerRe: Inheritance question Pin
DaveyM692-Oct-09 0:46
professionalDaveyM692-Oct-09 0:46 
AnswerRe: Inheritance question Pin
dojohansen3-Oct-09 1:12
dojohansen3-Oct-09 1:12 
QuestionStream System Sound to A GSM MODEM Pin
aghoshbabu1-Oct-09 23:09
aghoshbabu1-Oct-09 23:09 
AnswerRe: Stream System Sound to A GSM MODEM Pin
Rutvik Dave2-Oct-09 4:27
professionalRutvik Dave2-Oct-09 4:27 
QuestionDotNetOpenMail Authentication Pin
DotNetCoderJunior1-Oct-09 22:52
DotNetCoderJunior1-Oct-09 22:52 
AnswerRe: DotNetOpenMail Authentication Pin
Christian Graus1-Oct-09 23:05
protectorChristian Graus1-Oct-09 23:05 
GeneralRe: DotNetOpenMail Authentication Pin
DotNetCoderJunior1-Oct-09 23:23
DotNetCoderJunior1-Oct-09 23:23 

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.