Skip to content

DarkPassion/redis-ae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-ae

redis-2.6.17.tar.gz

quick start

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "ae.h"
#include "anet.h"

void writeProc(struct aeEventLoop* eventLoop, int fd, void* clientdata, int mask)
{
   /* write process */

}

void acceptProc(struct aeEventLoop* eventLoop, int fd, void* clientdata, int mask)
{

   /* accecpt process */

}

int main()
{
   aeEventLoop* el = aeCreateEventLoop(1024);
   int fd = anetTcpServer(myerr, 8080, "0.0.0.0");

   aeCreateFileEvent(el, fd, AE_READABLE, acceptProc, el);


   aeMain(el);

   aeDeleteEventLoop(el);

   return 0;
}

MQTT client mqttc

基于redis-ae event-loop Mqtt client

https://github.com/emqtt/mqttc

About

redis eventloop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages