Click here to Skip to main content
15,917,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to Hide Dialog window in a thread Pin
sanskypotov20-Feb-02 6:30
sanskypotov20-Feb-02 6:30 
AnswerRe: How to Hide Dialog window in a thread Pin
Joaquín M López Muñoz20-Feb-02 6:50
Joaquín M López Muñoz20-Feb-02 6:50 
QuestionDialog Bars? Pin
20-Feb-02 6:19
suss20-Feb-02 6:19 
AnswerRe: Dialog Bars? Pin
yellowine20-Feb-02 8:12
yellowine20-Feb-02 8:12 
GeneralQuick Queustion Pin
Steve Thresher20-Feb-02 6:13
Steve Thresher20-Feb-02 6:13 
GeneralRe: Quick Queustion Pin
Joaquín M López Muñoz20-Feb-02 7:03
Joaquín M López Muñoz20-Feb-02 7:03 
GeneralRendering Points and Lines in DirectX Pin
20-Feb-02 6:18
suss20-Feb-02 6:18 
GeneralReading lines in CAsyncSocket Pin
Jon Hulatt20-Feb-02 5:57
Jon Hulatt20-Feb-02 5:57 
Hi,

I've got a CAsyncSocket derived class, trying to implement my own high level protocol.

My command structure consists of a variable length line of text. The kind of thing that a CStdioFile::Readline() likes.

I have an OnReceive() handler which successfully reads the data. To break it into lines, i'm appending my data to a buffer as i receive it, then searching the buffer for \r\n. then, chopping out the left most part of the buffer based on the offset i found the \r\n.

It's all a bit slow though. I'm pretty sure that wanting data line by line is a pretty common need when using CAsyncSocket. How do other people implement this, efficiently?

Jon

Sorry to dissapoint you all with my lack of a witty or poignant signature.
GeneralRe: Reading lines in CAsyncSocket Pin
Joaquín M López Muñoz20-Feb-02 6:41
Joaquín M López Muñoz20-Feb-02 6:41 
GeneralRe: Reading lines in CAsyncSocket Pin
Tim Deveaux20-Feb-02 7:00
Tim Deveaux20-Feb-02 7:00 
GeneralRe: Reading lines in CAsyncSocket Pin
Joaquín M López Muñoz20-Feb-02 7:14
Joaquín M López Muñoz20-Feb-02 7:14 
GeneralRe: Reading lines in CAsyncSocket Pin
Tim Deveaux20-Feb-02 7:22
Tim Deveaux20-Feb-02 7:22 
GeneralRe: Reading lines in CAsyncSocket Pin
Joaquín M López Muñoz20-Feb-02 7:44
Joaquín M López Muñoz20-Feb-02 7:44 
GeneralRe: Reading lines in CAsyncSocket Pin
Dharminder20-Feb-02 20:15
Dharminder20-Feb-02 20:15 
QuestionDebugging MFC app in VS .Net? Pin
Stan Shannon20-Feb-02 5:19
Stan Shannon20-Feb-02 5:19 
AnswerRe: Debugging MFC app in VS .Net? Pin
Mazdak20-Feb-02 5:31
Mazdak20-Feb-02 5:31 
GeneralRe: Debugging MFC app in VS .Net? Pin
Stan Shannon20-Feb-02 6:06
Stan Shannon20-Feb-02 6:06 
GeneralMFC and DocumentView Pin
20-Feb-02 5:10
suss20-Feb-02 5:10 
GeneralRe: MFC and DocumentView Pin
Mazdak20-Feb-02 5:18
Mazdak20-Feb-02 5:18 
Generalfake HWND message loop in class Pin
Kuniva20-Feb-02 5:02
Kuniva20-Feb-02 5:02 
GeneralRe: fake HWND message loop in class Pin
Joaquín M López Muñoz20-Feb-02 5:32
Joaquín M López Muñoz20-Feb-02 5:32 
GeneralAdditional info Pin
Kuniva20-Feb-02 5:35
Kuniva20-Feb-02 5:35 
GeneralRe: Additional info Pin
Joaquín M López Muñoz20-Feb-02 6:36
Joaquín M López Muñoz20-Feb-02 6:36 
GeneralRe: Additional info Pin
Kuniva21-Feb-02 5:52
Kuniva21-Feb-02 5:52 
GeneralRe: Additional info Pin
Joaquín M López Muñoz21-Feb-02 6:01
Joaquín M López Muñoz21-Feb-02 6:01 

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.