New topic: 

ServerSocket example, how does it work!?

<http://forums.realsoftware.com/viewtopic.php?t=47301>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        Eclipse          Post subject: ServerSocket example, how does it 
work!?Posted: Fri Mar 15, 2013 6:47 pm                         
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                timhare          Post subject: 
Re: ServerSocket example, how does it work!?Posted: Fri Mar 15, 2013 7:03 pm    
                     
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12155
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                Eclipse          Post subject: 
Re: ServerSocket example, how does it work!?Posted: Sat Mar 16, 2013 3:40 am    
                     
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             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to