{"id":17993898,"url":"https://github.com/timandy/mmz-asio4delphi","last_synced_at":"2026-03-19T02:45:56.454Z","repository":{"id":34536968,"uuid":"38480426","full_name":"timandy/mmz-asio4delphi","owner":"timandy","description":"Automatically exported from code.google.com/p/mmz-asio4delphi","archived":false,"fork":false,"pushed_at":"2015-07-03T08:03:04.000Z","size":27576,"stargazers_count":0,"open_issues_count":11,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T05:13:55.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timandy.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-03T08:00:31.000Z","updated_at":"2015-07-03T08:02:54.000Z","dependencies_parsed_at":"2022-09-08T12:01:20.657Z","dependency_job_id":null,"html_url":"https://github.com/timandy/mmz-asio4delphi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timandy/mmz-asio4delphi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timandy%2Fmmz-asio4delphi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timandy%2Fmmz-asio4delphi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timandy%2Fmmz-asio4delphi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timandy%2Fmmz-asio4delphi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timandy","download_url":"https://codeload.github.com/timandy/mmz-asio4delphi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timandy%2Fmmz-asio4delphi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28559350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:13:23.611Z","updated_at":"2026-01-19T03:01:54.903Z","avatar_url":"https://github.com/timandy.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"{*******************************************************************************\r\n        ��Ԫ���ƣ�untASIOSvr.pas\r\n        �������ڣ�2011-04-07 17:26:15\r\n        ������\t  ������\r\n        ����:     ASIO ��ɶ˿ڷ�����ͨ�÷�װ\r\n        ��ǰ�汾��v1.1.0\r\n        ��ʷ��\r\n        v1.0.0 2011-04-07\r\n                  ��������Ԫ����ASIO���и�Ч�ʵķ�װ��\r\n                  ͬʱ��װ��Ч�����ݴ���ģ��\r\n        v1.0.1 2011-04-20\r\n                  �����˿ͻ����˳�ʱ��ʱ���쳣��BUG\r\n                  ��������ȷ�� �ڿͻ��˷��ʹ�����ʱ�����ֶ���Ƭ����\r\n                  �޸�write���̵ķ���ʵ��\r\n        v1.0.2 2011-04-25\r\n                  �����������ͻ��˵����쳣����Ӱ���������ӵ�BUG��\r\n                  ������������һ�����Ӳ���������BUG\r\n        v1.0.2a 2011-05-07\r\n                  ����TASIOCLIENT�� readinteger������һ��bug��\r\n                  ��лȺ��FlashDance������BUG : )\r\n                  ����������˳�ʱ���쳣���޸�ͨ��killtask�������̵ķ�ʽ\r\n                  �����������ͻ��˳�ʱ�䲻�����ݳ�ʱ���µ��쳣\r\n                  �����ͻ����û�������ʱ����ε�¼���·�����쳣\r\n                  ��лȺ��С�ĵĲ��Ժ����ⷴ��\r\n\r\n          v1.1.0 2011-05-16\r\n                  ��������첽Ͷ�ݿ��ܵ��µ��������򣨶���ļ�ͬʱ���أ�������������⣩\r\n                  �Ż��ײ�����Ч��\r\n********************************************************************************}\r\n\r\nĿ¼�ṹ����\r\n\r\nmmz-asio4delphi\\���ܲ��Գ���   \r\n      asio��װ�����ܲ��Գ��򣬰�������˺Ϳͻ����Լ����Դ��\r\n\r\nmmz-asio4delphi\\����ʾ������  \r\n      һ���򵥵�����ʾ�����򣬵ײ�ʹ��mmz-asio4delphiʵ��\r\n\t\t\t\r\nmmz-asio4delphi\\�ļ�����ʾ������  \r\n      һ���򵥵��ļ�����ʾ�����򣬻�������ʾ�����ײ�ʹ��mmz-asio4delphiʵ��\r\n\r\n     \r\nmmz-asio4delphi\\AsioDLL  \r\n      asio��c++��̬���װԴ�룬����vs2005��vs2003����Ŀ�ļ�\r\n\r\nmmz-asio4delphi\\untAsioSvr  \r\n      mmz-asio4delphi��Դ�룬������asio�ĸ�Ч�ʷ�װ\r\n      �ṩtcp������Լ��ͻ��˽ӿ�\r\n  \r\nmmz-asio4delphi\\Զ�����ݿ����_ado_asio֧��delphiȫ�汾   \r\n      UnidacԶ�̶�������°汾���ײ�ʹ��mmz-asio4delphiʵ��\r\n\r\nmmz-asio4delphi\\Զ�����ݿ����_uniDAC_ASIO�汾    \r\n      AdoԶ�̶�������°汾���ײ�ʹ��mmz-asio4delphiʵ��\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\nʵ��˵����\r\n\r\nTAsioSvr ��������ķ���˶��� \r\nTBaseSocketServer �Ǹ��ϲ��װ����Ҫ������һЩ�������� �����շ����ļ��շ��Ƚӿ�\r\nTCenterServer �Ǹ��ϲ��װ��ģ�⴦���û���¼ Ȩ�޼�� �¼����� �Լ��Ͽ�����\r\nTRmodbSvr  ����Ӧ�ò���\r\n\r\n���Ҫ�Լ�����TCP����� ����ѡ�������һ�����̳� \r\n\r\n�ͻ��˶���������� \r\nTAsioClient  �ǻ����Ŀͻ��˶���\r\nTSocketClient �Ǹ��ϲ��װ����Ҫ������һЩ�������� �����շ����ļ��շ��Ƚӿڣ�\r\nTRmoClient  ����Ӧ�ò����Զ����� ��������Ҳ������һ��\r\n\r\n----------------------------------------------------------------------------------------��˵�еĳ��(22900104)  15:18:44\r\nЭ��ͺܼ򵥰�   ͷ��4�ֽڣ�|���ȣ�4�ֽڣ�|���壨��������\r\n��˵�еĳ��(22900104)  15:19:12\r\n��ASIO�����ȡ��ʱ�� ����ȡ8���ֽڣ�Ȼ����ȡ����\r\n���¿�ʼ(704121401)  15:19:29\r\n ����ʲô��ͷ����ɶ��˼�����Լ����壿\r\n��˵�еĳ��(22900104)  15:19:34\r\n���������ҵ��Э��\r\n��˵�еĳ��(22900104)  15:20:10\r\n���Э������ ASIO������õģ� �����ҵ��Э�� �ڰ����ڶ���\r\n��˵�еĳ��(22900104)  15:20:48\r\nҲ���ǿͻ��� �����κ�һ�����ݰ� ��������ͷ�ͳ���\r\n��˵�еĳ��(22900104)  15:21:17\r\n SendAsioHead(8 + llen);\r\n��˵�еĳ��(22900104)  15:21:33\r\n���Կͻ��˺���ǰ��ȶ����������\r\n��˵�еĳ��(22900104)  15:21:38\r\n������û��\r\n��ˮ����(369859772)  15:22:09\r\nÿ�η���֮ǰ�Ȱ����ݳ��ȼ�8����ȥ��\r\n��˵�еĳ��(22900104)  15:22:33\r\n�Ǹ�8Ҳ�ǰ���� ����\r\n��˵�еĳ��(22900104)  15:22:42\r\nvar\r\n  llen, i: Integer;\r\n  ls: string;\r\n  Lend: integer;\r\n  Litem: TSelectitems;\r\nbegin\r\n  inc(Fsn);\r\n  Lend := 0;\r\n  ls := ISql;\r\n  llen := length(isql);\r\n  SendAsioHead(8 + llen);\r\n��˵�еĳ��(22900104)  15:22:51\r\nvar\r\n  llen, i: Integer;\r\n  ls: string;\r\n  Lend: integer;\r\n  Litem: TSelectitems;\r\nbegin\r\n  inc(Fsn);\r\n  Lend := 0;\r\n  ls := ISql;\r\n  llen := length(isql);\r\n  SendAsioHead(8 + llen);\r\n  WriteInteger(2);\r\n  WriteInteger(llen);\r\n  Write(ISql);\r\n��˵�еĳ��(22900104)  15:23:04\r\n8 ��   WriteInteger(2);   WriteInteger(llen);  ��2��\r\n��ˮ����(369859772)  15:23:32\r\n������\r\n��˵�еĳ��(22900104)  15:23:41\r\n  ����һ��Э�� \r\n��˵�еĳ��(22900104)  15:23:49\r\n����˵Ĵ�����֮ǰ��ȫһ��\r\n��ˮ����(369859772)  15:24:14\r\n�š�������ҿ�������ûʲô�仯\r\n��˵�еĳ��(22900104)  15:24:49\r\n�����ֱ�ӷ�װ TAsioSvr  �����Э�����ʡ��\r\n��˵�еĳ��(22900104)  15:26:09\r\nprocedure TCenterServer.UserConn(ClientThread: TAsioClient; Iwantlen: integer);\r\nvar\r\n  i, Lhead: Integer;\r\n  LPrd: PRBaseCaserd;\r\n  Lbuff: TPoolItem;\r\n  IClient: TAsioClient;\r\nbegin\r\n  IClient := ClientThread;\r\n  if IClient.DeadTime \u003e 0 then Exit;\r\n  try\r\n    if IClient.ConnState = Casio_State_Init then begin\r\n      OnConning(ClientThread);\r\n      if OnCheckLogin(ClientThread) then begin\r\n        ClientThread.ConnState := Casio_State_Conned\r\n      end\r\n      else begin\r\n        ClientThread.ConnState := Casio_State_DisConn;\r\n        OnDisConn(ClientThread);\r\n        ClientThread.Socket.Disconnect;\r\n      end;\r\n    end\r\n    else if IClient.ConnState = Casio_State_Conned then begin\r\n      //�ж����ݴ���״̬\r\n      case IClient.RcvDataBuffer.State of //��ȡ����ͷ\r\n        CdataRcv_State_head: begin\r\n            IClient.RcvDataBuffer.ReadInteger(true); //��ͷ\r\n            IClient.RcvDataBuffer.WantData := IClient.RcvDataBuffer.ReadInteger(true); //4���ֽ� //����\r\n            IClient.RcvDataBuffer.State := CdataRcv_State_Body; //��ȡ����\r\n//        DeBug('�յ�����\u003cCurrpost:%d ReadPos:%d NextSize:%d wantdata:%d\u003e',\r\n//          [IClient.RcvDataBuffer.CurrPost, IClient.RcvDataBuffer.ReadPos,\r\n//          IClient.RcvDataBuffer.Memory.Position, IClient.RcvDataBuffer.WantData]);\r\n          end;\r\n        CdataRcv_State_len: begin //��ȡ���ݳ���\r\n            IClient.RcvDataBuffer.WantData := IClient.RcvDataBuffer.ReadInteger(true); //4���ֽ�\r\n            IClient.RcvDataBuffer.State := CdataRcv_State_Body;\r\n//        DeBug('��������\u003cCurrpost:%d ReadPos:%d NextSize:%d wantdata:%d\u003e',\r\n//          [IClient.RcvDataBuffer.CurrPost, IClient.RcvDataBuffer.ReadPos,\r\n//          IClient.RcvDataBuffer.Memory.Position, IClient.RcvDataBuffer.WantData]);\r\n          end;\r\n        CdataRcv_State_Body: begin //��������\r\n           //IClient.RcvDataBuffer.ReadBuff(IClient.RcvDataBuffer.WantData); //4���ֽ�\r\n            IClient.RcvDataBuffer.WantData := 8;\r\n            IClient.RcvDataBuffer.State := CdataRcv_State_head;\r\n//        DeBug('��������\u003cCurrpost:%d ReadPos:%d NextSize:%d wantdata:%d\u003e',\r\n//          [IClient.RcvDataBuffer.CurrPost, IClient.RcvDataBuffer.ReadPos,\r\n//          IClient.RcvDataBuffer.Memory.Position, IClient.RcvDataBuffer.wantdata]);\r\n          {�������ݰ�}\r\n            DataCase(IClient);\r\n            \r\n��˵�еĳ��(22900104)  15:26:39\r\n�����֮���Բ��� ����ΪЭ���װ�������� TCenterServer�����\r\n��ˮ����(369859772)  15:26:41\r\n \r\n\r\n�ǲ���asioDataBufferһ���Զ�ȡ�ľͰ������淢���İ�ͷ�����峤�ȺͰ�������\r\n��������dxsockÿһ��write��Ӧһ��read?\r\n��˵�еĳ��(22900104)  15:27:21\r\n���ǵ�  asioֻҪ���յ����ݾͻ� ֪ͨ�ϲ�Ӧ�ã� ���ڰ�ͷ����ȴ��� ����Ӧ�ò���������\r\n��˵�еĳ��(22900104)  15:27:57\r\nҲ����ճ�� �����ղ������ݵȵ����� �������������ģ� \r\n��˵�еĳ��(22900104)  15:28:08\r\n����Ӧ�ò��ʱ�� �Ѿ��ǽ��յ�����������\r\n��˵�еĳ��(22900104)  15:28:12\r\n�ͻ���Ҳһ��\r\n��˵�еĳ��(22900104)  15:29:57\r\n��ͷ|����|���� ������Э�����֧���κδ�������\r\n��˵�еĳ��(22900104)  15:30:13\r\n���������Ƚ����\r\n��˵�еĳ��(22900104)  15:32:00\r\n�����ϲ�������Ĵ�����ʽ Ҳ�ǿ��Դ� TAsioSvr ֱ�Ӽ̳� ʵ���Լ���Э�鴦��\r\n��˵�еĳ��(22900104)  15:33:57\r\nTAsioSvr ��������ķ���˶��� \r\nTBaseSocketServer �Ǹ��ϲ��װ����Ҫ������һЩ�������� �����շ����ļ��շ��Ƚӿ�\r\nTCenterServer �Ǹ��ϲ��װ��ģ�⴦���û���¼ Ȩ�޼�� �¼����� �Լ��Ͽ�����\r\nTRmodbSvr  ����Ӧ�ò���\r\n��˵�еĳ��(22900104)  15:34:36\r\n���Ҫ�Լ�����TCP����� ����ѡ�������һ�����̳� \r\n��˵�еĳ��(22900104)  15:36:12\r\n�ͻ��˶���������� \r\nTAsioClient  �ǻ����Ŀͻ��˶���\r\nTSocketClient �Ǹ��ϲ��װ����Ҫ������һЩ�������� �����շ����ļ��շ��Ƚӿڣ��Զ����� ��������Ҳ������һ��\r\nTRmoClient  ����Ӧ�ò���\r\n\r\n��˵�еĳ��(22900104)  15:36:51\r\nŶ������˼ �Զ����� ���������� TRmoClient Ӧ�ò�ʵ�ֵ�\r\n\r\n��˵�еĳ��(22900104)  15:39:15\r\nTAsioClient�����\r\n{������ʽ��������}\r\n    function Writeinteger(Iint: Integer; ITrans: boolean = true): Integer;\r\n    function Write(Ibuffer: Pointer; Ilen: Integer): Integer; overload;\r\n    function Write(Istr: AnsiString): Integer; overload;\r\n\r\n\r\n    function WriteString(Istr: AnsiString): Integer;\r\n    {������ʽ��������}\r\n    function Readinteger(Itrans: Boolean = true): integer;\r\n    function ReadBuffer(Ibuffer: Pointer; Ilen: Integer): integer;\r\n    function ReadStr(Ilen: Integer): AnsiString;\r\n����Ϊ�ͻ����õ�\r\n\r\n��˵�еĳ��(22900104)  15:39:18\r\n    Socket: TAsioDataBuffer; //Ϊ�����ϳ��������� ����RcvDataBuffer�����ָ��\r\n    RcvDataBuffer: TAsioDataBuffer; //����buffer\r\n��˵�еĳ��(22900104)  15:39:38\r\n��TAsioDataBuffer ����Ϊ�ڷ���˵����ӵĶ���ʱ���õġ�\r\n��˵�еĳ��(22900104)  15:39:50\r\n// ��Щ�������Ƿ����ʱ�õ�  2011-04-14 15:28:27   ������\r\n    function ReadInteger(IrcvGob: Boolean = false; ITrans: Boolean = True): Integer;\r\n    function ReadStr(Ilen: integer; IrcvGob: Boolean = false): AnsiString;\r\n    function ReadBuff(Ibuffer: Pointer; Ilen: integer; IrcvGob: Boolean = false):\r\n      Integer;\r\n    procedure Writeinteger(Iin: Integer; Ihtn: boolean = true);\r\n    procedure Write(IBuffer: Pointer; Ilen: Integer); overload;\r\n    procedure Write(IStr: AnsiString); overload;\r\n    {�Ͽ�����}\r\n    procedure Disconnect;\r\n//------------------------------------------------------------------------------\r\n��˵�еĳ��(22900104)  15:40:18\r\n��Ϊ�ͻ��� �ͷ���� ��ż������TAsioClient ����\r\n��˵�еĳ��(22900104)  15:40:26\r\n��Ϊ�ͻ��� �ͷ���� ��������TAsioClient ����\r\n��˵�еĳ��(22900104)  15:42:36\r\n���仰˵ Ҳ���� ��Ϊtcp�ͻ��������ֱ�Ӵ���TAsioClient ����Ҫ�շ�����Ҳ��ֱ�ӵ���TAsioClient �µ�readxxx����writexxx������\r\n����tcp����ˣ�ÿ������Ҳ��TAsioClient���� �շ����ݾ�Ҫ����\r\nTAsioClient.Socket.writexxx��readxxx \r\n��˵�еĳ��(22900104)  15:42:51\r\n����������𣺣� \r\n��˵�еĳ��(22900104)  15:44:58\r\n����˵���� �Ǻ� �����ʻ�ӭ����\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimandy%2Fmmz-asio4delphi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimandy%2Fmmz-asio4delphi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimandy%2Fmmz-asio4delphi/lists"}