- 日時
2024-02-01
- 作
- 資料 バージョン
2024.1
- GitHub URL
- 製品 URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Companion code for the Linux terminals blog series: https://dev.to/napicella/linux-terminals-tty-pty-and-shell-192e | |
// I have simplified the code to highlight the interesting bits for the purpose of the blog post: | |
// - windows resizing is not addressed | |
// - client does not catch signals (CTRL + C, etc.) to gracefully close the tcp connection | |
// | |
// Build: go build -o remote main.go | |
// In one terminal run: ./remote -server | |
// In another terminal run: ./remote | |
// | |
// Run on multiple machines: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Tornado WebSocket Sample</title> | |
</head> | |
<body> | |
<input type="text" id="username" value="myname" /> | |
<button id="connect">connect</button> | |
<div id="result"></div> |