Page 2 of 2 FirstFirst 12
Results 41 to 57 of 57

Thread: VB6 - Yet Another Web Server

  1. #41
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    EspaƱa
    Posts
    506

    Re: VB6 - Yet Another Web Server

    okay thanks
    Greetings

  2. #42
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Exclamation Re: VB6 - Yet Another Web Server

    I've found some weird behavior with this project but don't know why it happens.

    If you compile to pcode instead of native code, errors that would normally show a popup (overflow, file not found, etc) just end up killing the program.

    You can use these steps to reproduce

    1. Add a button with the following code

    dim d as double
    d = 1 / 0

    2. go to the Compile tab in the project properties and select Pcode

    3. compile and run the exe (you must run the exe, the ide behaves correctly)

    4. click the button and the exe crashes without showing the overflow error message

    Does anyone know why this happens?

  3. #43
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: VB6 - Yet Another Web Server

    do you have simple web server VB6 CODE?
    Only For show website

  4. #44
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    I'm still having trouble figuring out why compiling to pcode causes the program to close instead of showing error messages. Does anyone have any insight into this?

  5. #45
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by strangeprob View Post
    You can use these steps to reproduce

    1. Add a button with the following code

    dim d as double
    d = 1 / 0

    2. go to the Compile tab in the project properties and select Pcode

    3. compile and run the exe (you must run the exe, the ide behaves correctly)

    4. click the button and the exe crashes without showing the overflow error message

    Does anyone know why this happens?
    I just compiled a test project to p-code and it does show a message box with

    Code:
    ---------------------------
    Project1
    ---------------------------
    Run-time error '11':
    
    Division by zero
    ---------------------------
    OK   
    ---------------------------
    and *then* terminates as expected.

    Do you have SP6 installed?

    cheers,
    </wqw>

  6. #46
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by wqweto View Post
    I just compiled a test project
    test projects work correctly for me too. It's when I compile *this* project that it fails.

    I do have sp6

  7. #47
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by strangeprob View Post
    It's when I compile *this* project that it fails.
    There are 9 versions of this project in this thread alone and I'm unwilling to spare more time guessing and reimplementing the test.

    You can attach a zip with a *failing* project complete i.e. the button and all the steps you described above zipped.

    cheers,
    </wqw>

  8. #48
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by wqweto View Post
    There are 9 versions of this project in this thread alone and I'm unwilling to spare more time guessing and reimplementing the test.

    You can attach a zip with a *failing* project complete i.e. the button and all the steps you described above zipped.

    cheers,
    </wqw>
    Thanks for looking. See attached, you will need to compile and the run the exe to see the behavior

    I compiled both and recorded the button click so you can see the behavior differences:
    https://imgur.com/a/dVTIMm2
    Attached Files Attached Files

  9. #49
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    EspaƱa
    Posts
    506

    Re: VB6 - Yet Another Web Server

    Your project works perfectly for me.
    I've also been using it for a long time

    a greeting

  10. #50
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    I've tried compiling on a few different computers but I keep getting the same behavior.

  11. #51
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by strangeprob View Post
    I've tried compiling on a few different computers but I keep getting the same behavior.
    This seems to be a bug in VB6 concerning a custom user-control containing another custom user-control when events are frozen by the container.

    To work around it just remove/comment out UserControl_Resize event implementation in GossClient user-control (not Gossamer).

    @dilettante: No idea why this is failing w/ p-code compile but GossClient's fixed size makes no difference altogether and might consider scraping it's UserControl_Resize at some point if new version gets released.

    cheers,
    </wqw>

  12. #52
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by wqweto View Post
    This seems to be a bug in VB6 concerning a custom user-control containing another custom user-control when events are frozen by the container.
    Thank you for looking at this!!!!

    We spent a lot of time trying to find what was causing this. How did you pinpoint the resize event?

  13. #53
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by strangeprob View Post
    Thank you for looking at this!!!!

    We spent a lot of time trying to find what was causing this. How did you pinpoint the resize event?
    I removed the Gossamer user-control from the failing form and placed another empty user-control instead and noticed that upon fatal "Division by zero" MsgBox this user-control became checkered as being marked inactive so there must be some repainting interaction going on between container form and its contained user-controls on this fatal MsgBox but Paint in not implemented anywhere, only Resize so. . .

    It took me 5 minutes and 20 years of previous VB6 experience :-))

    cheers,
    </wqw>

  14. #54
    New Member
    Join Date
    Jan 2021
    Posts
    8

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by wqweto View Post
    I removed the Gossamer user-control from the failing form and placed another empty user-control instead and noticed that upon fatal "Division by zero" MsgBox this user-control became checkered as being marked inactive so there must be some repainting interaction going on between container form and its contained user-controls on this fatal MsgBox but Paint in not implemented anywhere, only Resize so. . .

    It took me 5 minutes and 20 years of previous VB6 experience :-))

    cheers,
    </wqw>
    again, can't thank you enough for looking at this. was driving us crazy for several days, works perfectly now.

  15. #55
    Member
    Join Date
    Oct 2020
    Posts
    53

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by couttsj View Post
    I converted Gossamer to utilize SimpleServer instead of the Winsock Control. It utilizes a single User Control, as mServer(0) serves as the listening socket and the remainder of the socket arrays service the connections. It provides the ability to use IPV6 instead of just IPV4, although this has not been tested as yet.

    I tried to preserve as much of the original code as I could. It is not necessarily the way that I would normally do it. Each programmer has his/her own style. For example, the original code used STATIC_BUFFER_SZ As Long = 8192. SimpleServer uses whatever the operating system provides. In my case the buffer size is 65,536, and for the moment I have left the buffer size at 8,192 until I can figure out how to transfer that value from SimpleServer.

    There is no reason that encrypted data cannot be integrated into this service. If I was to do it, I would incorporate TLS 1.3. This can be viewed as a starting point, as there is only a small part of TLS 1.2 that provides the same protection. All previous versions are obsolete/obfuscated.

    This download does not include the contents of the \site or \art directories.

    J.A. Coutts

    Updated: 09/03/2020
    I loved this version combined with SimpleServer, my only problem has been that when remotely downloading many large files to another computer on the network, the browser does not load all the content and is perpetually waiting for a response from the server... and terminates the transfer ...I was checking out the "Gossamer1-7-PcodeVsNative.zip" version which doesn't have this problem, but I'm a bit lost to find the differences, I've been looking for a solution for hours and trying to adapt as I prefer to avoid winsock. please help! ha ha ha.

  16. #56
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: VB6 - Yet Another Web Server

    Quote Originally Posted by Maatooh View Post
    I loved this version combined with SimpleServer, my only problem has been that when remotely downloading many large files to another computer on the network, the browser does not load all the content and is perpetually waiting for a response from the server... and terminates the transfer ...I was checking out the "Gossamer1-7-PcodeVsNative.zip" version which doesn't have this problem, but I'm a bit lost to find the differences, I've been looking for a solution for hours and trying to adapt as I prefer to avoid winsock. please help! ha ha ha.
    SimpleServer is far from perfect. Like most VB6 multithreaded programs operating over a network, it is severely limited by VB6 itself. Each download must run in it's own environment, and cannot run concurrently. For the past several months I have been working on utilizing IOCP (I/O Completion Ports). This technology not only enables the server to operate on multiple CPU cores, but each core also operates using a signaled procedure. That is to say that each core can manage several connections by queueing the requests until the server is capable of handling them. I have recently run into a problem with SimpleSock not being able to keep up with what IOCP can deliver over a local network, and I am having to reprogram the client program before addressing the remaining problems with the server.

    J.A. Coutts

  17. #57
    Member
    Join Date
    Oct 2020
    Posts
    53

    Re: VB6 - Yet Another Web Server

    I get it, I finally resigned myself to Winsock. No problem, I understand the barriers of vb6 and the few options in 32-bit. However, I keep faith in your work. vb6 is made to overcome its own barriers, there is no doubt, many achievements over the years Thanks J.A Coutts

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width