• English
    English Español Français Deutsch Português Русский 日本語 한국어 Italiano العربية हिन्दी বাংলা Türkçe Tiếng Việt ไทย 简体中文 繁體中文(港) 繁體中文(臺)

webman manual

  • Foreword
  • Principle
  • Must-Read for Development
  • Getting Started
    • Features
    • Simple Development Example
  • Installation
    • System Requirements
    • Download and Install
    • Start and Stop
  • Development Process
    • Must-Read Before Development
    • Directory Structure
    • Development Standards
    • Basic Process
  • Worker Class
    • Constructor
    • Properties
      • id
      • count
      • name
      • protocol
      • transport
      • reusePort
      • connections
      • stdoutFile
      • pidFile
      • logFile
      • user
      • reloadable
      • daemonize
      • globalEvent
    • Callback Properties
      • onWorkerStart
      • onWorkerReload
      • onConnect
      • onMessage
      • onClose
      • onBufferFull
      • onBufferDrain
      • onError
    • Interfaces
      • runAll
      • stopAll
      • listen
  • TcpConnection Class
    • Properties
      • id
      • protocol
      • worker
      • maxSendBufferSize
      • defaultMaxSendBufferSize
      • defaultMaxPackageSize
    • Callback Properties
      • onMessage
      • onClose
      • onBufferFull
      • onBufferDrain
      • onError
    • Interfaces
      • send
      • getRemoteIp
      • getRemotePort
      • close
      • destroy
      • pauseRecv
      • resumeRecv
      • pipe
  • AsyncTcpConnection Class
    • __construct
    • connect
    • reconnect
    • transport
  • AsyncUdpConnection Class
    • __construct
    • connect
    • send
    • close
  • Timer Class
    • add
    • del
    • Timer Precautions
    • crontab
  • Http Service
    • Request
    • Response
    • Session
    • Session Management
    • SSE
  • Coroutine
    • Introduction to Coroutine
    • Coroutine Context
    • Connection Pool
    • Coroutine Barrier
    • Coroutine Parallelism
    • Coroutine WaitGroup
    • Coroutine Locker
    • Coroutine Channel
  • Communication Protocols
    • Purpose of Communication Protocols
    • Custom Communication Protocols
    • Some Examples
  • Debugging
    • Basic Debugging
    • Check the Running Status with status Command
    • Debugging Busy Process
    • Network Packet Capture
    • Trace System Calls
  • Common Components
    • GlobalData Shared Data Component
      • GlobalDataServer
      • GlobalDataClient
        • add
        • cas
        • increment
    • Channel Distributed Communication Component
      • ChannelServer
      • channelClient
        • connect
        • on
        • publish
        • unsubscribe
      • Example - Cluster Push
      • Example - Group Sending
    • FileMonitor File Monitoring Component
    • MySQL Component
      • Database Class
    • Redis Component
      • workerman/redis
    • Asynchronous Http Component
      • workerman/http-client
    • Asynchronous Message Queue Component
      • workemran/mqtt
      • workerman/redis-queue
      • workerman/stomp
      • workerman/rabbitmq
    • Crontab Scheduled Tasks
    • Memcache
  • Frequently Asked Questions
    • Heartbeat
    • Auto Loading
    • Reasons for Client Connection Failure
    • Does it Support Multithreading
    • Integration with Other Frameworks
    • Running Multiple Workerman
    • What Protocols are Supported
    • How to Set the Number of Processes
    • Check the Number of Client Connections
    • Persistence of Objects and Resources
    • Example Doesn't Work
    • Startup Failure
    • Stop Failure
    • How Many Concurrences are Supported
    • Code Changes Do Not Take Effect
    • Send Data to Specific Client
    • How to Actively Push Messages
    • Push in Other Projects
    • How to Implement Asynchronous Tasks
    • Reasons for send_fail in Status
    • Development on Windows, Deployment on Linux
    • Does it Support socket.io
    • Terminal Closure Leads to Workerman Shutdown
    • Relationship with Nginx and Apache
    • Disable Function Check
    • Smooth Restart Principle
    • Open Port 843 for Flash
    • How to Broadcast Data
    • How to Create a UDP Service
    • Listen to IPv6
    • Close Unauthenticated Connections
    • Transmission Encryption - SSL/TLS
    • Create WSS Service
    • Create HTTPS Service
    • Workerman as a Client
    • As WS/WSS Client
    • WeChat Mini Program
    • PHP Callback Method Variants
    • Get Real Client IP Through Proxy
    • Startup with System
    • Receive and Send Hexadecimal Data
    • Restart After Receiving a Certain Number of Requests
    • Initialize Multiple Workers on Windows
    • Requests Concentrated in Certain Processes
  • Appendix
    • Optimize Linux Kernel
    • Stress Testing
    • Install Extensions
    • WebSocket Protocol
    • WS Protocol
    • Text Protocol
    • Frame Protocol
    • Unsupported Functions/Features
  • Copyright Information

Can Workerman act as a client to receive and process data from a remote server?

You can initiate an asynchronous connection using AsyncTcpConnection, allowing Workerman to interact as a client with the server.

For example, the following examples illustrate this:

  1. Workerman as a WebSocket client

  2. Workerman as a MySQL proxy

  3. Workerman as an HTTP client

  4. Workerman as an HTTP proxy

  5. Workerman as a SOCKS5 proxy