Click here to Skip to main content
15,949,686 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Unique number from two numbers Pin
theCPkid18-May-10 1:39
theCPkid18-May-10 1:39 
GeneralRe: Unique number from two numbers Pin
CPallini18-May-10 1:45
mveCPallini18-May-10 1:45 
QuestionSocket message(frame) pattern matching Pin
Hamed Musavi13-May-10 7:42
Hamed Musavi13-May-10 7:42 
AnswerRe: Socket message(frame) pattern matching Pin
Luc Pattyn13-May-10 7:55
sitebuilderLuc Pattyn13-May-10 7:55 
GeneralRe: Socket message(frame) pattern matching Pin
Hamed Musavi13-May-10 8:21
Hamed Musavi13-May-10 8:21 
GeneralRe: Socket message(frame) pattern matching Pin
Luc Pattyn13-May-10 8:31
sitebuilderLuc Pattyn13-May-10 8:31 
GeneralRe: Socket message(frame) pattern matching Pin
Hamed Musavi13-May-10 8:55
Hamed Musavi13-May-10 8:55 
GeneralRe: Socket message(frame) pattern matching Pin
Luc Pattyn13-May-10 9:05
sitebuilderLuc Pattyn13-May-10 9:05 
You're welcome.

One thing that isn't clear to me, is why you would not (to a rather high degree) trust incoming messages? If your network is using say Ethernet, and your messages are less than 1500 bytes in length, then they would fit in a single Ethernet packet, and hence the lower network layers would deal with bad packets, the app would only get real ones, probably containing exactly one message.

Things are entirely different on a serial port such as RS232C, where you may not have packets, and just inserting/removing/powercycling the peripheral may well result in a couple of spurious bytes. Or maybe you are implementing something like SLIP[^]?

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: Socket message(frame) pattern matching Pin
Hamed Musavi13-May-10 9:25
Hamed Musavi13-May-10 9:25 
GeneralRe: Socket message(frame) pattern matching Pin
Luc Pattyn13-May-10 9:34
sitebuilderLuc Pattyn13-May-10 9:34 
GeneralRe: Socket message(frame) pattern matching Pin
Hamed Musavi13-May-10 9:39
Hamed Musavi13-May-10 9:39 
QuestionNeed of Decision Tree Implementation Pin
Radiit6-May-10 3:05
Radiit6-May-10 3:05 
Questionfind a sulution! Pin
wbgxx3-May-10 3:59
wbgxx3-May-10 3:59 
AnswerRe: find a sulution! Pin
Kevin Drzycimski3-May-10 4:06
Kevin Drzycimski3-May-10 4:06 
GeneralRe: find a sulution! Pin
wbgxx3-May-10 4:12
wbgxx3-May-10 4:12 
GeneralRe: find a sulution! Pin
Luc Pattyn3-May-10 4:13
sitebuilderLuc Pattyn3-May-10 4:13 
GeneralRe: find a sulution! Pin
wbgxx3-May-10 4:15
wbgxx3-May-10 4:15 
AnswerRe: find a solution! Pin
theCPkid6-May-10 2:21
theCPkid6-May-10 2:21 
GeneralRe: find a solution! [modified] Pin
Radhakrishnan G.18-May-10 3:30
Radhakrishnan G.18-May-10 3:30 
GeneralRe: find a solution! Pin
talazz12-May-11 2:53
talazz12-May-11 2:53 
QuestionSimulating movement Pin
Code-o-mat24-Apr-10 5:49
Code-o-mat24-Apr-10 5:49 
AnswerRe: Simulating movement Pin
Software_Developer24-Apr-10 10:12
Software_Developer24-Apr-10 10:12 
GeneralRe: Simulating movement Pin
Code-o-mat24-Apr-10 22:02
Code-o-mat24-Apr-10 22:02 
GeneralRe: Simulating movement Pin
Software_Developer29-Apr-10 6:26
Software_Developer29-Apr-10 6:26 
AnswerRe: Simulating movement Pin
molesworth29-Apr-10 7:11
molesworth29-Apr-10 7:11 

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.