🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Confusion on Blocking Sockets

#5600
From: mike
Date: Tue, 20 Jul 2004 21:46
59 lines
2578 bytes
Remy

Thank you for answering my post.

Here is how I am creating the Socket thread.

void __fastcall TForm1::ServerSocket2GetThread(TObject *Sender,
      TServerClientWinSocket *ClientSocket,
      TServerClientThread *&SocketThread)
{
     SocketThread = new TMyServerThread( false, ClientSocket )
;
}

And now if I go through the connections like the following I'm not sure how
to get the value of the variable;

 for( i=0;i<ServerSocket2->Socket->ActiveConnections;i++)
 {
thread->SomeVariable <<<<<-------------- This is the piece I don't
understand how to do
 }

Hope you can assist me

Mike

"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:40fd8a86$1@newsgroups.borland.com...
>
> "mike" <mfbrowne@earthlink.net> wrote in message
> news:40fd7549$1@newsgroups.borland.com...
>
> > If I create a blocking socket thread and within the socket thread
> > under "public" I define a variable, how would I retreive the value
> > of the variable from outside the class.
>
> The same way you access public members for any class in general.  You
create
> an instance of the thread when needed, and then later on you use a pointer
> to that thread to access the member, ie:
>
>     TMyServerThread *thread = new TMyServerThread(Socket);
>     //...
>     // use thread->SomeVariable as needed....
>
> If that does not help you, then you need to explain, in detail, exactly
what
> you are having a problem with.
>
> > Also on the same note how would I execute the
> > above SomeFunction() from outside the class declaration.
>
> The same way as executing a method of any other class instance.
>
>
> Gabit
>
>
Technical Details
Message-ID: <40fd9118$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40fd7549$1@newsgroups.borland.com> <40fd8a86$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,aa96f08785735f2d
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mike" <mfbrowne@earthlink.net>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <40fd7549$1@newsgroups.borland.com> <40fd8a86$1@newsgroups.borland.com>
Subject: Re: Confusion on Blocking Sockets
Date: Tue, 20 Jul 2004 17:46:27 -0400
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 68.204.191.95
Message-ID: <40fd9118$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1090359576 68.204.191.95 (20 Jul 2004 14:39:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail