Git Product home page Git Product logo

zantcpdemo's Introduction

ZanTcpDemo

zan php tcp server demo

如何使用

  1. 安装 zan扩展,编译参数: ./configure --enable-async-redis --enable-sockets --enable-openssl
  2. 安装[composer](curl -sS https://getcomposer.org/installer | php)
  3. 在根目录下执行composer update
  4. 配置php.ini
zanphp.RUN_MODE = test
zanphp.DEBUG = true
  1. 启动tcp server php bin/nova

如何提供nova服务供http-demo调用

详情参见 NOVA示例教程

  1. 编写nova服务thrift文件
  2. 生成nova存根代码, 发布到仓库
  3. tcp(nova服务端)项目 与 http(nova客户端)项目 composer.json 分别添加 nova存根代码 依赖
  4. tcp(nova服务端)项目 实现 nova 服务接口, 配置发布服务
  5. http(nova客户端)项目 配置直接tcp-server,通过 nova 存根代码调用nova服务

相关文档

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.