Become a member
Sign in
Leo Lin
Leo Lin

Leo Lin

8 Following
6 Followers
  • Profile

  • Claps

  • Highlights

Latest

Leo Lin
Leo Lin
Jun 25, 2018 · 2 min read

筆記 [Go] — Cookies & Sessions

實作會員註冊、登入、登出

利用 cookie 存 uuid, 當用戶端發出 request 時, 就會把這份 cookie 一併傳送到伺服器端, 讀取 request 中的 cookie, 取得 uuid, 以此查 session-user 的資料表.

如果有查到對應的 userID, 表示這個用戶目前是處於登入狀態, 不需要再登入一次;如果沒有查到對應的 userID, 則表示此用戶需要進行登入的動作, 登入後就會把這一個 uuid-userID…

50

Leo Lin
Leo Lin
Jun 15, 2018 · 5 min read

筆記 [Go] — TCP Server

從底層開始了解並且實作簡單的 TCP Server

Write to connection

50

Leo Lin
Leo Lin
Jun 10, 2018 · 4 min read

筆記 [Go] — HTTP Server

Handler, http.Handle, http.HandlerFunc, http.HandleFunc, http.ServeMux, http.ListenAndServe

106

Leo Lin
Leo Lin
Jun 9, 2018 · 5 min read

筆記 [Web] — Performance

50

Leo Lin
Leo Lin
Jun 8, 2018 · 3 min read

筆記 — SSH

Symmetrical Encryption

<加密端> 跟 <解密端> 使用同一支鑰匙 🔑,因此這支鑰匙不該在網路上被傳送,需要使用 Diffie Hellman Key Exchange Algorithm 來產生這支共用的鑰匙。

Diffie Hellman Key Exchange Algorithm

50