🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: initialising a ClientSocket

#5019
From: duncan
Date: Mon, 15 Nov 2004 15:02
42 lines
2358 bytes
Hans,

>You forgot to assign the OnConnect eventhandler ?

I believe the OnConnect event handler is assigned in 

void NetworkSupport::set_file_components
       (TServerSocket * const ServerSocket, 
           TClientSocket * const ClientSocket)

   //  Assign the components
   ClientSocket = _file_client_pointer;

   //initialise file client
   ClientSocket->Address = "10.98.88.34";
   ClientSocket->Port = 7017;
   ClientSocket->Open();
  
   //Assign the client events
   ClientSocket -> OnConnect = file_client_connect;
   ClientSocket -> OnConnecting = file_client_connecting;
   ClientSocket -> OnDisconnect = file_client_disconnect;
   ClientSocket -> OnError = file_client_error;
   ClientSocket -> OnLookup = file_client_lookup;
   ClientSocket -> OnRead = file_client_read;
   ClientSocket -> OnWrite = file_client_write;

The above works, (ClientSocket -> OnConnect is called) however when

      ClientSocket->Address = "10.98.88.34";
      ClientSocket->Port = 7017;
      ClientSocket->Open();

is moved to the OnClick instead, the ClientSocket -> OnConnect
is not called.

do I need to assign the OnClick eventhandler someware else?

Thanks

Duncan
Technical Details
Message-ID: <4198d30f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41938125$1@newsgroups.borland.com> <4193a0bb@newsgroups.borland.com> <41989b78$1@newsgroups.borland.com> <4198a148$1@newsgroups.borland.com> <4198aed9$1@newsgroups.borland.com> <4198b1a6$1@newsgroups.borland.com> <4198be15@newsgroups.borland.com> <4198cb39$1@newsgroups.borland.com> <4198cf03$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f81efd77741cef0b
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "duncan" <no_spam@spamsucks.com>
Sender: "duncan" <no_spam@spamsucks.com>
Reply-To: "duncan" <no_spam@spamsucks.com>
Subject: Re: initialising a ClientSocket
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 194.129.249.241     
References: <41938125$1@newsgroups.borland.com> <4193a0bb@newsgroups.borland.com> <41989b78$1@newsgroups.borland.com> <4198a148$1@newsgroups.borland.com> <4198aed9$1@newsgroups.borland.com> <4198b1a6$1@newsgroups.borland.com> <4198be15@newsgroups.borland.com> <4198cb39$1@newsgroups.borland.com> <4198cf03$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4198d30f$1@newsgroups.borland.com>
Date: 15 Nov 2004 08:02:23 -0700
X-Trace: newsgroups.borland.com 1100534543 207.105.83.66 (15 Nov 2004 08:02:23 -0700)
Lines: 43
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail