Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
poll改成epoll, 订阅树加索引
Browse files Browse the repository at this point in the history
  • Loading branch information
w3hacker committed Apr 20, 2017
0 parents commit a3aa420
Show file tree
Hide file tree
Showing 382 changed files with 43,636 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
*.o
*.exe
*.db
c/*.test
cpp/*.test
*.pyc
*.vglog

client/mosquitto_pub
client/mosquitto_sub
examples/mysql_log/mosquitto_mysql_log
examples/temperature_conversion/mqtt_temperature_conversion
man/mosquitto.8
man/mosquitto-tls.7
man/mosquitto.conf.5
man/libmosquitto.3
man/mosquitto_passwd.1
man/mosquitto_pub.1
man/mosquitto_sub.1
man/mqtt.7
src/db_dump/mosquitto_db_dump
src/mosquitto
src/mosquitto_passwd
test/broker/broker.pid
test/test_client
test/fake_user
test/msgsps_pub
test/msgsps_sub
test/msgsps_pub.dat
test/msgsps_sub.dat
test/broker/c/auth_plugin.so

lib/cpp/libmosquittopp.so*
lib/libmosquitto.so*
lib/libmosquitto.a

test/ssl/*.csr

test/lib/c/*.test
test/lib/cpp/*.test

build/
dist/
89 changes: 89 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This is a cmake script.

set(CMAKE_LEGACY_CYGWIN_WIN32 0)

project(mosquitto)

cmake_minimum_required(VERSION 2.6)

set (VERSION 1.4)

if (WIN32)
execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
else (WIN32)
execute_process(COMMAND date "+%F %T%z" OUTPUT_VARIABLE TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (WIN32)

add_definitions (-DCMAKE -DVERSION=\"${VERSION}\" -DTIMESTAMP=\"${TIMESTAMP}\")

if (WIN32)
set (BINDIR .)
set (SBINDIR .)
set (SYSCONFDIR .)
set (LIBDIR .)
set (INCLUDEDIR include)
set (DATAROOTDIR share)
set (MANDIR man)
set (SHAREDEST .)
add_definitions("-D_CRT_SECURE_NO_WARNINGS")
add_definitions("-D_CRT_NONSTDC_NO_DEPRECATE")
else (WIN32)
set (BINDIR bin)
set (SBINDIR sbin)
if (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)
set (SYSCONFDIR /etc/mosquitto)
else (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)
set (SYSCONFDIR etc/mosquitto)
endif (${CMAKE_INSTALL_PREFIX} STREQUAL /usr)

set (LIBDIR lib${LIB_SUFFIX})
set (INCLUDEDIR include)
set (DATAROOTDIR share)
set (MANDIR ${DATAROOTDIR}/man)
set (SHAREDIR ${DATAROOTDIR}/mosquitto)
endif (WIN32)

option(WITH_TLS
"Include SSL/TLS support?" ON)
option(WITH_TLS_PSK
"Include TLS-PSK support (requires WITH_TLS)?" ON)
option(WITH_EC
"Include Elliptic Curve support (requires WITH_TLS)?" ON)
if (${WITH_TLS} STREQUAL ON)
find_package(OpenSSL REQUIRED)
add_definitions("-DWITH_TLS")

if (${WITH_TLS_PSK} STREQUAL ON)
add_definitions("-DWITH_TLS_PSK")
endif (${WITH_TLS_PSK} STREQUAL ON)

if (${WITH_EC} STREQUAL ON)
add_definitions("-DWITH_EC")
endif (${WITH_EC} STREQUAL ON)
else (${WITH_TLS} STREQUAL ON)
set (OPENSSL_INCLUDE_DIR "")
endif (${WITH_TLS} STREQUAL ON)

option(WITH_SOCKS "Include SOCKS5 support?" ON)
if (${WITH_SOCKS} STREQUAL ON)
add_definitions("-DWITH_SOCKS")
endif (${WITH_SOCKS} STREQUAL ON)

option(WITH_SRV "Include SRV lookup support?" ON)

# ========================================
# Include projects
# ========================================

add_subdirectory(lib)
add_subdirectory(client)
add_subdirectory(src)
add_subdirectory(man)

# ========================================
# Install config file
# ========================================

install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR})
100 changes: 100 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Contributing to Mosquitto
=========================

Thank you for your interest in this project.

Project description:
--------------------

The Mosquitto project has been created to provide a light weight, open-source
implementation, of an MQTT broker to allow new, existing, and emerging
applications for Machine-to-Machine (M2M) and Internet of Things (IoT).

- https://projects.eclipse.org/projects/technology.mosquitto


Source
------

The Mosquitto code is stored in a git repository. The URLs to access it are:

ssh://<username>@git.eclipse.org:29418/mosquitto/org.eclipse.mosquitto
https://<username>@git.eclipse.org/r/mosquitto/org.eclipse.mosquitto

A web browsable repository is available at

http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.git

Contributing a patch
--------------------

The Mosquitto repositories are accessed through Gerrit, the code review
project, which makes it possible for anybody to clone the repository, make
changes and push them back for review and eventual acceptance into the project.

To do this, you must follow a few steps. The first of these are described at

- https://wiki.eclipse.org/Development_Resources/Contributing_via_Git

* Sign the Eclipse CLA
* Use a valid commit record, including a signed-off-by entry.

There are further details at

- https://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions

Once the patch is pushed back to Gerrit, the project committers will be
informed and they will undertake a review of the code. The patch may need
modifying for some reason. In order to make amending commits more
straightforward, the steps at
https://git.eclipse.org/r/Documentation/cmd-hook-commit-msg.html should be
followed. This automatically inserts a "Change-Id" entry to your commit message
which allows you to amend commits and have Gerrit track them as the same
change.

What happens next depends on the content of the patch. If it is 100% authored
by the contributor and is less than 1000 lines (and meets the needs of the
project), then it can be committed to the main repository. If not, more steps
are required. These are detailed in the legal process poster:

- http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf

Developer resources:
--------------------

More information regarding source code management, builds, coding standards,
and other topics can be found at.

- https://projects.eclipse.org/projects/technology.mosquitto/developer


Contributor License Agreement:
------------------------------

Before your contribution can be accepted by the project, you need to create and
electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

- http://www.eclipse.org/legal/CLA.php


Contact:
--------

Contact the project developers via the project's "dev" list.

- https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Search for bugs:
----------------

This project uses Bugzilla to track ongoing development and issues.

- https://bugs.eclipse.org/bugs/buglist.cgi?product=Mosquitto

Create a new bug:
-----------------

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!

- https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mosquitto
Loading

0 comments on commit a3aa420

Please sign in to comment.