Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In
Continue with Google
Continue with Facebook
or use


Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here
Continue with Google
Continue with Facebook
or use


Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Continue with Google
Continue with Facebook
or use


Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Stack Ask

Stack Ask Logo Stack Ask Logo

Stack Ask Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 4260
Next
In Process
Nguyễn Linh
  • 0
Nguyễn LinhBeginner
Asked: January 10, 20222022-01-10T03:41:03+00:00 2022-01-10T03:41:03+00:00In: EzyFox Server

Cách sử dụng Ezy Http bên trong Ezyfox Server

  • 0

Dạ mọi người ơi cho em hỏi làm thế nào để sử dung EzyHttp bên trong Ezyfox Server, vì em thấy phần EzySimpleSettings trong ApplicationStartup trong thư mục startup có thể set HttpSimpleHttpSettings

ezyfox-serverezyhttp
  • 8 8 Answers
  • 107 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

8 Answers

  • Voted
  • Oldest
  • Recent
  1. Nguyễn Linh Beginner
    2022-01-10T04:50:52+00:00Added an answer on January 10, 2022 at 4:50 am

    dạ cám ơn anh Dũng, vậy mình có thể start ezyhttp bên trong ezyfox-server không anh nhỉ? hoặc một cách gì đấy để mình có thể tái sử dụng code logic của dự án mà em đã xây dựng bên ezyfox server cho bên ezy http dùng

    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
    • monkey Enlightened
      2022-01-10T04:54:48+00:00Replied to answer on January 10, 2022 at 4:54 am

      1. Em không nên em ạ, em nên start socket và http thành 2 service riêng biệt em nhé.
      2. Để tái sử dụng thì em tổ chức source code thì em nên tách phần dùng chung thành 1 module common source code, kiểu cấu trúc dự án sẽ là:
      – game-app-entry
      – game-app-api
      – game-plugin
      – game-common
      – game-socket-startup
      – game-http-startup

      Thì tất cả có thể sử dụng chung các service bên trong game-common em ạ.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
      • Nguyễn Linh Beginner
        2022-01-10T05:05:20+00:00Replied to answer on January 10, 2022 at 5:05 am
        This answer was edited.

        dạ em hiểu rồi, tiếc quá, em thì vẫn thích cả http và socket cùng chung 1 service hơn là tách ra 2, chung 1 service có thể chia sẻ bộ nhớ với nhau, client có thể sendByHttp hoặc sendBySocket 1 request nào đó đến server của mình đều được, thông qua việc server nhận được là http hay socket mà tạo ra 1 kiểu đối tượng (vd OperationRequest) điều hướng cho 1 Controller đảm nhận việc xử lí OperationRequest trả về OperationResponse, sau đó server trả về theo socket hay http do client request ban đầu

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
          • Share on LinkedIn
          • Share on WhatsApp
          • Report
        • monkey Enlightened
          2022-01-10T05:14:20+00:00Replied to answer on January 10, 2022 at 5:14 am

          Trên thực tế thì controller của socket và controller của http là 2 thứ hoàn toàn khác nhau em ạ. Và các bean như responseFactory của socket thì http cũng sẽ không có, nó sẽ làm cho http bị lỗi em ạ. Nhưng nếu em vẫn muốn start chung với nhau em vẫn có thể làm được bằng cách quy hoặc package của socket và http khác nhau để bọn nó không scan chồng chéo nhau và gây lỗi em ạ.

          • 1
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
            • Share on LinkedIn
            • Share on WhatsApp
            • Report
        • Nguyễn Linh Beginner
          2022-01-10T05:10:07+00:00Replied to answer on January 10, 2022 at 5:10 am

          chẳng hạn client gọi request sendChatAllApi(msg) bằng Http request, server sẽ đưa cho bên HttpController tạo ra OperationRequest từ request vừa rồi, sau đó đưa cho bên ChatController xử lí và return OperationResponse, HttpController lấy được OperationResponse và gửi lại cho client,

          Trong ChatController khi xử lí ChatAll, sẽ gửi msg đó đến cho tất cả những EzyUser đang online.

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
            • Share on LinkedIn
            • Share on WhatsApp
            • Report
          • monkey Enlightened
            2022-01-10T06:58:49+00:00Replied to answer on January 10, 2022 at 6:58 am

            Anh đoán chức năng này dành cho admin, vậy anh nghĩ là nên để chức năng này do socket admin thực hiện em ạ. Vì kiểu gì thì admin cũng sẽ phải kết nối đến socket để tương tác realtime vơi hệ thống và user.

            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter
              • Share on LinkedIn
              • Share on WhatsApp
              • Report
          • Nguyễn Linh Beginner
            2022-01-13T06:20:20+00:00Replied to answer on January 13, 2022 at 6:20 am

            dạ em cám ơn anh Dũng, mình có demo phần socket admin này không cho em xin với ạ

            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter
              • Share on LinkedIn
              • Share on WhatsApp
              • Report
  2. monkey Enlightened
    2022-01-10T04:27:21+00:00Added an answer on January 10, 2022 at 4:27 am
    This answer was edited.

    1. Trước đây thì có thể start http cùng với ezyfox-server, nhưng hiện tại thì không thể em ạ, http đã bị bỏ ra khỏi ezyfox-server và trở thành ezyhttp em nhé.

    2. Em nên tách riêng http và socket server ra em ạ, vì 2 cái này tính chất khác nhau, và cách xác thực cũng khác nhau em ạ.

    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

You must login to add an answer.

Continue with Google
Continue with Facebook
or use


Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 554
  • Answers 1k
  • Best Answers 63
  • Users 291
  • Popular
  • Answers
  • monkey

    [Deep Learning] Làm thế nào để xác định được cái ...

    • 16 Answers
  • Tú Trần Anh

    [Ezyfox Server] Unity game client không gửi được command khi ...

    • 12 Answers
  • monkey

    [Go] khi nào go func được gọi?

    • 10 Answers
  • monkey
    monkey added an answer 1. Em có thể lưu dữ liệu tạm ở Local… May 25, 2022 at 4:52 am
  • Hoàng Kiếm
    Hoàng Kiếm added an answer Huy ơi bạn đã thử login bằng command, mysql -u… May 21, 2022 at 5:42 am
  • tvd12
    tvd12 added an answer public class EzyEventLoopGroup { private final EzyRoundRobin eventLoops; private final… May 19, 2022 at 2:20 pm

Related Questions

  • Nguyễn Thái Sơn

    apache thrift

    • 1 Answer
  • Nguyễn Thái Sơn

    ezyfox login

    • 1 Answer
  • Nguyễn Thái Sơn

    factory pattern trong Ezyfox

    • 3 Answers

Top Members

tvd12

tvd12

  • 63 Questions
  • 1k Points
Enlightened
monkey

monkey

  • 88 Questions
  • 588 Points
Enlightened
Nguyễn Thái Sơn

Nguyễn Thái Sơn

  • 140 Questions
  • 220 Points
Professional

Trending Tags

.net core abstract class analytics android ansible anti-flooding apache poi api async asyncawait atomicboolean backend backend nestjs bash script batch bean big project binding bitcoin blockchain blog british buffered build bundle c# cache caching callback career career path cast centos chat cloud cloud reliability commit company content-disposition contract cors cosmos css database datasource datastructure decentralized exchange deep learning design-pattern devops dex distraction programing docker download draw.io du học dữ liệu lớn eclip editor employee english erc20 erc721 eth ethereum ethereum login extensions exyfox ezyfox ezyfox-boot ezyfox-server ezyfoxserver ezyhttp facebook fe flutter freetank french front-end frontend fullstack fulltextsearch future game game-box game-room game-server get git go golang google grapql grpc guide hazelcast hibernate hibernateconfig html http https indexing intellij interface interview io ipfs isolate issue it java javacore java core javascript java spring javaw java web job jpa js json jsp & servlet jvm jwt kafka keep promise kerberos keycloak kotlin language languague library load-balancing log log4j log4j-core login lưu trữ machine learning macos math maven merge messaging metamask microservice model msgpack multiple tenant multithread multithreading mysql n naming naming convention netcore netty nft nft game nio nodejs non-blocking io opensource optimize orm pagination pancakeswap panic pgpool phỏng vấn pointer postgresql pre programming promise push message android python python unicode question queue rabbitmq reactive reactjs reactjs download recyclerview redis request resource rest roadmap ropssten ropsten rust rxjava schedule search security server shift jis singleton sjis slack smart contract socket soft delete sosanh spring spring-boot-test spring-jpa spring aop spring boot springboot spring data jpa spring redis spring security springsecurity sql sql server sse stackask storage stream structure trong spring boot system environment variables thread threadjava thymeleaf totp tracking location unit test unity upload file vector view volatile vue vue cli web3 web3 client webpack websocket windows 11 winforms work zookeeper

Footer

Stack Ask

Stack Ask is where Developers Ask & Answers. It will help you resolve any questions and connect you with other people.

About Us

  • Meet The Team
  • About Us
  • Contact Us

Legal Stuff

  • Terms of Service
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2021 Stack Ask. All Rights Reserved
Powered by youngmonkeys.org