🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3232

Re: i need ideas/comments with tclientsocket

#3232
From: Jonathan Benedicto
Date: Mon, 31 Oct 2005 16:12
23 lines
2036 bytes
Alfred wrote:
> I am trying to use it.. but i have a problem :

Sorry, that code was untested. Try this:

TDataStruct *Data = reinterpret_cast<TDataStruct>( Socket->Data );

> I dont understand very well how it work, can you help me ?
> What happen to server when :
> - I get half package, it store it in Data->DataStream, i get a second
> package it owerwrite datastream ? ( Data->DataStream->Write( Buffer,
> DataLength ); ) or it is written and the end of the olf Datastream ?

If you get a second packet, then it is written at the end of the stream.

> - I get half package, it store it in Data->Datastream, now i get a
> new half package by another client (another socket) . It is stored in
> a new datastream or it make confusione the the old one ?

By using the Socket->Data to store the TDataStruct's pointer, I make sure 
that every socket, or connection, has its own stream.

Jonathan
Technical Details
Message-ID: <4366425e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43662baf$1@newsgroups.borland.com> <43663272$1@newsgroups.borland.com> <4366417f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,5c33b8c6a9ca7fdb
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <43662baf$1@newsgroups.borland.com> <43663272$1@newsgroups.borland.com> <4366417f$1@newsgroups.borland.com>
Subject: Re: i need ideas/comments  with tclientsocket
Date: Mon, 31 Oct 2005 11:12:21 -0500
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.158.116.150
Message-ID: <4366425e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1130775134 69.158.116.150 (31 Oct 2005 08:12:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail