Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat May 27, 2017 1:27 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ServerSocket example, how does it work!?
PostPosted: Fri Mar 15, 2013 6:47 pm 
Offline

Joined: Sat May 19, 2007 6:01 am
Posts: 300
http://docs.realsoftware.com/index.php/ServerSocket

First, there is a ServerSocket.

Then a ClientSocket taken from the TCPSocket.
But after the line "CurSocket is an Integer property of the window and is initialized to 0." there is a ClientSocket again!?

Or, is that a third TCPSocket? I don't quite follow... and staring at hours at this example doesn't make me any brighter!!
What am I missing!?


Top
 Profile  
 
 Post subject: Re: ServerSocket example, how does it work!?
PostPosted: Fri Mar 15, 2013 7:03 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
That page is describing 2 separate programs. The first one is the server and has a serversocket and a clientsocket and is described down to the line:

"This triggers the AddSocket event that creates the initial pool of sockets."

It listens for incoming connections.

The second program is the client program and makes connections to the server program. Its description begins at the line

"The client application has a "Connect" button to connect to the ServerSocket application"

It has an array of tcp sockets, which the line you're talking about refers to. The whole thing is further complicated by the fact that both programs use a variable named cursocket.

HTH,
Tim


Top
 Profile  
 
 Post subject: Re: ServerSocket example, how does it work!?
PostPosted: Sat Mar 16, 2013 3:40 am 
Offline

Joined: Sat May 19, 2007 6:01 am
Posts: 300
Make sense! Thank you!
I think this code is far from complete because I get many errors while compiling both the server and the client.

But I also read elsewhere in this forum, others also find this example difficult.
But in one way or another, it must be working and I just need more experience!!
I found a working example of a really neat code but I don't know where it origins from...

Maybe I shall just fiddle with that code and edit it to suit my needs!?
For now, it might be as bright...??? Haha!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group