Code Monkey home page Code Monkey logo

Comments (12)

isgbuddy avatar isgbuddy commented on June 29, 2024

Windows7 + Delphi 10.2.3

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

我这么衰?跑你们官方自带的 demo 出错

from delphi-cross-socket.

pony5551 avatar pony5551 commented on June 29, 2024

自行调试一下,我10.4.1没有问题

看你这提示TCrossHttpServer都没释放掉

from delphi-cross-socket.

pony5551 avatar pony5551 commented on June 29, 2024

我说明一下出错原因!
uDM.pas 的201行 FHttpServer := TCrossHttpServer.Create(0, True);
改成
FHttpServer := TCrossHttpServer.Create(0, False);

demo默认启用https,但没有证书文件,你也可以自己生成证书文件测试

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

谢谢,我试试

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

procedure TDM.DataModuleCreate(Sender: TObject);
begin
{$IFDEF CROSS_SSL}
FHttpServer := TCrossHttpServer.Create(0, True);
if FHttpServer.SSL then
begin
FHttpServer.SetCertificate(SSL_SERVER_CERT);
FHttpServer.SetPrivateKey(SSL_SERVER_PKEY);
end;
{$ELSE}
FHttpServer := TCrossHttpServer.Create(0, false);
{$ENDIF}
// FHttpServer.Addr := IPv4_ALL; // IPv4
// FHttpServer.Addr := IPv6_ALL; // IPv6
FHttpServer.Addr := IPv4v6_ALL; // IPv4v6
FHttpServer.Port := AppCfg.ListenPort;
FHttpServer.Compressible := True;

FHttpServer.OnConnected := _OnConnected;
FHttpServer.OnDisconnected := _OnDisconnected;

_CreateRouter;
_CreateWatchThread;
end;

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

建议把这个 demo 这里改成这样,就不出一上来就出错了,会给人感觉不太好

from delphi-cross-socket.

pony5551 avatar pony5551 commented on June 29, 2024

这个本来没有bug的,后来rony建议搞成https,http共存,所以就出了这个bug!
话说作者好久没出现了,估计比较忙

from delphi-cross-socket.

pony5551 avatar pony5551 commented on June 29, 2024

小问题自己折腾一下,框架还是很稳定的,运行90天无报错,因系统更新才重启的

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

@pony5551 这个框架推荐跑在 linux 下还 windows 下比较好?我看更新日志里写 linux 可能会有内存泄漏?

from delphi-cross-socket.

pony5551 avatar pony5551 commented on June 29, 2024

linux下只要不用ssl就没问题,这个是openssl的问题!你可以找个稳定一点的openssl自己折腾一下

from delphi-cross-socket.

isgbuddy avatar isgbuddy commented on June 29, 2024

linux下只要不用ssl就没问题,这个是openssl的问题!你可以找个稳定一点的openssl自己折腾一下

感谢感谢

from delphi-cross-socket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.