目前用Gatewayworker做完了硬件設(shè)備的那部分長(zhǎng)連接的后臺(tái),App端目前對(duì)實(shí)時(shí)性要求不高,不打算用長(zhǎng)連接做,準(zhǔn)備用workerman來寫http接口就行。
我想問一下,用workerman寫Http接口要怎么寫?
建了worker("http://xxx")后怎么給App提供不同的接口?url?
用workerman寫和直接在gatewayworker里start一個(gè)WebServer("http://xxx"),然后寫一些接口文件放在對(duì)應(yīng)目錄下兩個(gè)有什么區(qū)別?
https://github.com/xtgxiso/WebWorker
https://github.com/top-think/think-worker
https://github.com/hetao29/slightphp
https://github.com/tourze/workerman-yii2
https://github.com/victorruan/WorkermanYii2
https://github.com/heikezy/ThinkWorker
這里收集了幾個(gè)關(guān)于workerman http的項(xiàng)目可以點(diǎn)個(gè)start 收藏下試下。
話說回來,做接口其實(shí)用nginx php-fpm這種架構(gòu)就夠了