netcat

Stream video from Raspberry pi to Opencv application on remote computer

北战南征 提交于 2019-11-27 06:31:55
问题 What I am trying to achieve is, I have a raspberry 3 with pi camera v2 connected to my local wifi. I want to transmit a live video from the raspberry pi to a computer running Ubuntu. On my computer I am trying to process that video with opencv in real time. The code below is just a sample code to test the video coming from the raspberry pi on my Ubuntu computer. I am using netcat to stream the video and I have listed the shell script below the code. #include <opencv2/highgui/highgui.hpp>

Using netcat/cat in a background shell script (How to avoid Stopped (tty input)? )

自作多情 提交于 2019-11-27 02:52:28
问题 Abstract: How to run an interactive task in background? Details: I am trying to run this simple script under ash shell (Busybox) as a background task. myscript.sh& However the script stops immediately... [1]+ Stopped (tty input) myscript.sh The myscript.sh contents... (only the relvant part, other then that I trap SIGINT, SIGHUP etc) #!/bin/sh catpid=0 START_COPY() { cat /dev/charfile > /path/outfile & catpid = $! } STOP_COPY() { kill catpid } netcat SOME_IP PORT | while read EVENT do case

Scripting an HTTP header request with netcat

故事扮演 提交于 2019-11-27 01:07:50
问题 I'm trying to play around with netcat to learn more about how HTTP works. I'd like to script some of it in bash or Perl, but I've hit upon a stumbling block early on in my testing. If I run netcat straight from the prompt and type in a HEAD request, it works and I receive the headers for the web server I'm probing. This works: [romandas@localhost ~]$ nc 10.1.1.2 80 HEAD / HTTP/1.0 HTTP/1.1 200 OK MIME-Version: 1.0 Server: Edited out Content-length: 0 Cache-Control: public Expires: Sat, 01 Jan

Minimal web server using netcat

独自空忆成欢 提交于 2019-11-26 18:45:17
问题 I'm trying to set up a minimal web server using netcat (nc). When the browser calls up localhost:1500, for instance, it should show the result of a function ( date in the example below, but eventually it'll be a python or c program that yields some data). My little netcat web server needs to be a while true loop in bash, possibly as simple as this: while true ; do echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 ; done When I try this the browser shows the currently available data during

Netcat implementation in Python

风流意气都作罢 提交于 2019-11-26 18:13:00
问题 I found this and am using it as my base, but it wasn't working right out of the box. My goal is also to treat it as a package instead of a command line utility, so my code changes will reflect that. class Netcat: def __init__(self, hostname, port): self.hostname = hostname self.port = port def send(self, content): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.connect((self.hostname, self.port)) self.socket.setblocking(0) result = ''; read_ready, write_ready, in

Flume 入门

℡╲_俬逩灬. 提交于 2019-11-26 00:28:50
1 Flume 概述 1.1 定义 Flume 是 Cloudera 提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统; Flume 基于流式架构,灵活简单。 1.2 特点 可以和任意存储进程集成 输入的的数据速率大于写入目的存储的速率, Flume 会进行缓冲,减小 HDFS 的压力 Flume 中的事务基于 Channel ,使用了两个事务模型( sender + receiver ),确保消息被可靠发送 Flume 使用两个独立的事务分别负责从 Soucrce 到 Channel ,以及从 Channel 到 Sink 的事件传递。一旦事务中所有的数据全部成功提交到 Channel ,那么 Source 才认为该数据读取完成,同理,只有成功被 Sink 写出去的数据,才会从 Channel 中移除 1.3 组成架构 1.3.1 Agent Agent 是一个 JVM 进程,它以事件的形式将数据从源头传递到目的地 Agent 主要由 Source 、 Channel 、 Sink 组成 1.3.2 Source Source 是负责接收数据到 Agent 的组件,可以处理各种类型,包括 avro 、 thrift 、 exec 、 jms 、 spooling directory 、 netcat 、 sequence generator 、 syslog