Real Software Forums
http://forums.realsoftware.com/

WEB EDITION ServerSocket App Open Event
http://forums.realsoftware.com/viewtopic.php?f=2&t=46668
Page 1 of 2

Author:  p0wn3d [ Thu Jan 24, 2013 12:24 pm ]
Post subject:  WEB EDITION ServerSocket App Open Event

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

Author:  MonkeybreadSoftware [ Thu Jan 24, 2013 1:07 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

in a web app there is a main loop, so no need to call doevents.

Greetings
Christian

Author:  p0wn3d [ Thu Jan 24, 2013 1:16 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

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

:?

Author:  MonkeybreadSoftware [ Thu Jan 24, 2013 1:27 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

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

Author:  p0wn3d [ Fri Jan 25, 2013 5:06 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

: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

Author:  MonkeybreadSoftware [ Fri Jan 25, 2013 5:12 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

replace

dim mServerSocket as

with

mServerSocket =

so you use the property and not the variable.

Greetings
Christian

Author:  p0wn3d [ Fri Jan 25, 2013 5:26 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event (Bug)

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:

Author:  p0wn3d [ Fri Jan 25, 2013 7:34 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

Has anyone else come across this it's driving me MAD :evil:

Author:  p0wn3d [ Fri Jan 25, 2013 10:59 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

Bump anyone?
:roll:

Author:  MonkeybreadSoftware [ Fri Jan 25, 2013 11:21 am ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

Do you have a ServerSocket subclass at all?
Somewhere you need to provide the sockets...

Greetings
Christian

Author:  p0wn3d [ Fri Jan 25, 2013 12:04 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

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

Author:  MonkeybreadSoftware [ Fri Jan 25, 2013 12:18 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

In the code above you don't use the MyServerSocket!

Greetings
Christian

Author:  timhare [ Fri Jan 25, 2013 2:02 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

nvm...

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

Author:  p0wn3d [ Fri Jan 25, 2013 3:26 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

:? I thought my socketserver addsocket event was subclassing?

Author:  timhare [ Fri Jan 25, 2013 3:44 pm ]
Post subject:  Re: WEB EDITION ServerSocket App Open Event

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.

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/