Skip to main content

OIMWS SDK Server User Guide

OIMWS SDK Server is a server-side program written in Go, designed to handle WebSocket connections and provide instant messaging services. This document aims to guide you through the installation and operation of OIMWS SDK Server, explaining its main features and parameter configurations.

Installation

You can install OIMWS SDK Server in two ways:

  1. Clone the GitHub Repository: Clone the OIMWS GitHub Repository to your local environment:

    git clone https://github.com/openimsdk/oimws

    After doing so, please read the README file and execute the program in the example/ directory.

Execution

Before running OIMWS SDK Server, ensure it is correctly installed.

Running the program requires configuring some parameters, which you can set through command-line flags. Here is the main function of the program and its parameters:

openimApi: "http://127.0.0.1:10002"
openimWs: "ws://127.0.0.1:10001"
sdkWsPort: [ 10003 ]
dbDir: "../../../../db/"

Parameter Explanation

  1. openimApi: The listening address for the openIM API, default is http://127.0.0.1:10002.
  2. openimWs: The WebSocket listening address for openIM, default is ws://127.0.0.1:10001.
  3. sdkWsPort: The listening port for openIMSDK WebSocket, default is 10003.
  4. dbDir: The directory for the openIM database, default is the ./db folder in the current directory.

Running Example

In the command line, you can modify these parameters by adding flags. For example:

# compile
mage
# start
mage start

This will start the server and configure the service based on the provided parameters.

Conclusion

OIMWS SDK Server offers a flexible and powerful platform for handling instant messages and WebSocket connections. By following this guide, you should be able to successfully install and operate OIMWS SDK Server, as well as understand and configure its main parameters. For more advanced configurations and detailed information, refer to the project's GitHub page and related documentation.