TCP
-
F# Async TCP Server Simple ExampleF# 2021. 1. 2. 18:59
[Original Source] http://www.fssnip.net/1E/title/Async-TCP-Server [Modifed] .net core에서 컴파일되도록 일부 수정한 코드입니다. (Option type 적용등) 작동 확인 : 2021-01-02 open System open System.Net open System.Net.Sockets open System.Threading type Socket with member socket.AsyncAccept() = Async.FromBeginEnd(socket.BeginAccept, socket.EndAccept) member socket.AsyncReceive(buffer: byte [], ?offset, ?count) = let offset ..
-
mysql tcp 모니터링 코드Linux 2017. 11. 8. 14:14
루트권한 필요.#!/bin/bash tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e 'while() { chomp; next if /^[^ ]+[ ]*$/; if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i) { if (defined $q) { print "$q\n"; } $q=$_; } else { $_ =~ s/^[ \t]+//; $q.=" $_"; }}'