• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dinkelk/linux-ipc-wrappers: A set of simple C libraries that simplify the use of ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dinkelk/linux-ipc-wrappers

开源软件地址(OpenSource Url):

https://github.com/dinkelk/linux-ipc-wrappers

开源编程语言(OpenSource Language):

C 88.4%

开源软件介绍(OpenSource Introduction):

linux-ipc-wrappers

This is a set of simple C libraries that simplify the use of Linux message queues, semaphores, shared memory, sockets, timers, and even serial ports.

The wrappers provided include:

  • MessageQueueWrapper.c - a simple wrapper around System V message queues
  • SemaphoreWrapper.c - a simple wrapper around Linux semaphores
  • SerialWrapper.c - a simple wrapper which allows reading and writing from serial ports with all flow control turned off
  • SharedMemoryWrapper.c - a simple wrapper around Linux shared memory
  • SocketWrapper.c - a simple wrapper for performing IPv4 TCP socket operations
  • TimerWrapper.c - a simple wrapper around linux time operations, providing a one-shot timer, a periodic timer, and a stop watch like timer

Compilation:

Just run make.

Examples:

Examples on how to use these libraries can be found in the examples/ directory. Compiling the source will create 4 examples programs:

  • messageQueueWrapperTest - This example creates a System V message queue that connects two message queue ids. A message is sent between the two ids.
  • semaphoreWrapperTest - This example creates a set of semaphores and performs various actions on them.
  • socketWrapperTest - This example sends an HTTP request to a server and returns the resultant HTML.
  • serialWrapperTest - This example requires the program socat which can be installed via apt-get or similiar. socat is used to connect a /dev/pts/# to stdout simulating a serial port connection. The example sends data through the simulated serial port and then receives data given by the user.

Contribution:

These wrappers mostly serve as a reminder to me of how to use the various Linux IPC functions. If you find a bug, or want to improve what I have here, please submit a pull request.

Enjoy!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap