STUP - the Implementation (3)

throughput and window size

The wisdom of STUP protocol is all about the window size. The throughput of a TCP communication is limited by two windows: the congestion window and the receive window. The congestion window can determine how many bytes that can be send a simple piece of time …

more ...

STUP - Packet Structure and State Machine (2)

STUP Packet Structure

Brief Introduction of TCP & UDP Packet Structure

STUP pretend itself as a protocol at the Transmission Layer, but actually it's absolutely an Application Layer protocol. So before we start, I'd like to recall some knowledge of two important Transmission Layer protocol: TCP & UDP.

It is well known …

more ...

STUP - another (stupid) TCP over UDP protocol (1)

What is STUP?

STUP is the abbreviation of "Speeded/Secure Tcp-like Udp Protocol", which means that it's another TCP over UDP protocol.

Why TCP over UDP?

TCP is a network protocol for general purpose, and it's one of the most commonly used internet protocol on this planet. It is reliable …

more ...

WorkflowyMd Release Note

What is it?

I've writen several workflowy enhance plugins by UserScript. The very first one is show the full content of the note of a bullet. The second one is to show images under the bullet. Then I worked on the background image to make a more colorful workflowy.

Yeah …

more ...

Parallel patterns in C#

写在前面

与C/C++所使用的,传统的基于线程的并行模式不同,C#实现了丰富的并发编程模型,其中以异步模型最为流行。

本 …

more ...

Twisted Defer and DeferredQueue

写在最前面

这篇文章本来是想用英文写的,但是最近英文水平下降的和狗一样。还是怂一波吧。

写在前面

最近在用Twisted库写一个诡异的项目,具体 …

more ...

Mosca源码阅读

先在前面

最近心血来潮看了看一个比较有名的开源MQTT broker —— Mosca。不读不知道,读完才恍然大悟 —— 这是啥破玩意(哈哈)。

由于我是nodejs的超级初学者 …

more ...

总结 - phxrpc代码阅读(8)

写在前面

这应该是phxrpc代码阅读系列正文的最后一篇。通过阅读代码,发现了自己在知识上的若干不足。

临渊羡鱼,不如退而结网。接下来可能会在网络编程 …

more ...

RPC - phxrpc代码阅读(7)

前言

看了这么久代码,终于我们要接近phxrpc的核心部分了。

但是出人意料的是,rpc部分并没有过多的概念和magic trick。而且因为ucontext已经被封装好了,所以在rpc里的操作,可以完全按照同步的写法来搞,开 …

more ...

非阻塞TCP流和HttpClient - phxrpc代码阅读(6)

写在前面

其实这点东西有点鸡肋。因为TCP流在前面已经讲过,难点在于“流”和“流缓冲区”部分。而HttpClient只是TCP流的一个应用,代码不多,且重点在于HTTP协议的调教上面。

不过因为前面有写阻 …

more ...