Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Jan 18, 2018 10:52 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: About ServerSocketServer example
PostPosted: Thu Dec 27, 2012 1:19 pm 
Offline

Joined: Sun Oct 21, 2012 10:47 am
Posts: 76
Location: Slovenia
Well i finally got to the understanding of Real Studio object orientated coding, but now i cannot understand where the variable mNum comes from, and/or where it gets it value, i found that it gets it like this.

mNum = num

From the Constructor method, but what/where is that num getting the value...

Also where does the
Return ret
value in mServerSocket ---> AddSocket method, send the ret value ?


Top
 Profile  
Reply with quote  
 Post subject: Re: About ServerSocketServer example
PostPosted: Thu Dec 27, 2012 4:49 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Primoz128 wrote:
Well i finally got to the understanding of Real Studio object orientated coding, but now i cannot understand where the variable mNum comes from, and/or where it gets it value, i found that it gets it like this.

mNum = num

From the Constructor method, but what/where is that num getting the value...

Window1 has a property named curSocket. Every time the serversocket creates a new tcpsocket, it increments that value and passes it into the socket's constructor. The number acts as an identifier, so the program can tell which socket to communicate with later.

Quote:
Also where does the
Return ret
value in mServerSocket ---> AddSocket method, send the ret value ?

That goes to a data structure internal to the serversocket. It keeps a list of all the sockets, both the ones that are connected and a list of available ones that it can use for the next incoming connection.


Top
 Profile  
Reply with quote  
 Post subject: Re: About ServerSocketServer example
PostPosted: Thu Dec 27, 2012 9:34 pm 
Offline

Joined: Sun Oct 21, 2012 10:47 am
Posts: 76
Location: Slovenia
Real Studio wants a lot of knowledge in the programmer <.<.


Top
 Profile  
Reply with quote  
 Post subject: Re: About ServerSocketServer example
PostPosted: Thu Dec 27, 2012 11:02 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Primoz128 wrote:
Real Studio wants a lot of knowledge in the programmer <.<.


Not really.
There's a lot of languages I can think of that are way more difficult to master.

But you DO have to spend some time and go through either the tutorials or curriculum to get familiar with how things work otherwise it will be a never ending battle.

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: About ServerSocketServer example
PostPosted: Fri Dec 28, 2012 12:12 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
ServerSocket isn't really entry-level stuff. RB makes things very simple, but there is a limit to what it can do for you.


Top
 Profile  
Reply with quote  
 Post subject: Re: About ServerSocketServer example
PostPosted: Fri Dec 28, 2012 4:05 am 
Offline

Joined: Sun Oct 21, 2012 10:47 am
Posts: 76
Location: Slovenia
Well i choose RS to be for server side of my project thus it is for me.

And i did spend 5 hours in the user's guide.


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

All times are UTC - 5 hours


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group