Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Mar 28, 2017 12:50 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: WEB EDITION ServerSocket App Open Event
PostPosted: Thu Jan 24, 2013 12:24 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
I notice that the Web edition uses app.open and the desktop edition uses app.run are there any differences?

I have the following code in my app.open event of my we application

dim mServerSocket as new ServerSocket
mServerSocket.Port= 55555
mServerSocket.MinimumSocketsAvailable = 10
mServerSocket.listen


Do i need an app doevent to get the socket listening?

Thanks

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Thu Jan 24, 2013 1:07 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
in a web app there is a main loop, so no need to call doevents.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Thu Jan 24, 2013 1:16 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Very strange does not appear to be opening the listening socket on port 5555

netstat -aN at the command prompt does not show it has opened either

:?

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Thu Jan 24, 2013 1:27 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
You need to keep the socket alive to have it staying open!

So store a reference in a property and not just a local variable.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 5:06 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
:roll: Still not been able to get things working my desktop server version work fine but the web edition is proving a little problematic. My guess is that I have overlooked something simple

Main Project Window
mServerSocket -> Super ServerSocket
ClientSocket -> Super EasyTCPSocket

mServerSocket -> AddSocket Event
dim ret as EasyTCPSocket = new ClientSocket
curSocket = curSocket + 1
return ret

Properties->cursocket As Integer

App Open Event
dim mServerSocket as new ServerSocket
mServerSocket.Port= 7777
mServerSocket.MinimumSocketsAvailable = 10
mServerSocket.listen

Property->mserversocket As Serversocket

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 5:12 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
replace

dim mServerSocket as

with

mServerSocket =

so you use the property and not the variable.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event (Bug)
PostPosted: Fri Jan 25, 2013 5:26 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Hi Christian

I did try that yesterday but there is something very strange going on with the WE App

If you replace the local variable with mServerSocket = new ServerSocket and then run the Application the default webpage does not load it just hangs.

:roll:

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 7:34 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Has anyone else come across this it's driving me MAD :evil:

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 10:59 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Bump anyone?
:roll:

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 11:21 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Do you have a ServerSocket subclass at all?
Somewhere you need to provide the sockets...

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 12:04 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Hi Cristian :?:

All I have is my mserversocket as serversocket and an EasyTCPSockcket as clientsocket

mserversocket addsoscket event
dim ret as EasyTCPSocket = new ClientSocket
curSocket = curSocket + 1
return ret

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 12:18 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
In the code above you don't use the MyServerSocket!

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 2:02 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
nvm...

You need to make a subclass of ServerSocket like Christian said.


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 3:26 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
:? I thought my socketserver addsocket event was subclassing?

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
 
 Post subject: Re: WEB EDITION ServerSocket App Open Event
PostPosted: Fri Jan 25, 2013 3:44 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Then what is the subclass' name? You have not mentioned a subclass yet. What are the steps you take to get from the Project tab to the event code? That might help clarify what you've got.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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