# socket

Published articles for socket.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## SSH Tips and Tricks

DevFeed: [SSH Tips and Tricks](<https://devfeed.tech/articles/ssh-tips-and-tricks-37852.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/ssh-tips-and-tricks/>)

Author: Carlos Alexandro Becker

Published: 2022-08-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [ssh](<https://devfeed.tech/topics/ssh.md>), [OpenSSH](<https://devfeed.tech/topics/openssh.md>), [Git](<https://devfeed.tech/topics/git.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Server](<https://devfeed.tech/topics/server.md>), [Unix](<https://devfeed.tech/topics/unix.md>)

Tags: [git](<https://devfeed.tech/tags/git.md>), [remote](<https://devfeed.tech/tags/remote.md>), [server](<https://devfeed.tech/tags/server.md>), [shell](<https://devfeed.tech/tags/shell.md>), [socket](<https://devfeed.tech/tags/socket.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [tips](<https://devfeed.tech/tags/tips.md>), [tricks](<https://devfeed.tech/tags/tricks.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

A practical tutorial covering SSH tips such as signing Git commits and tags with SSH keys, forwarding a Yubikey agent, reusing connections, entering tmux sessions directly, and defining shorter host aliases. It also notes security considerations for agent forwarding and persistent sockets.

### Source excerpt

Since I joined Charm, I've been working and learning more about SSH, and I thought I would share a few quick tips and tricks with you.

## Addressing

DevFeed: [Addressing](<https://devfeed.tech/articles/addressing-38990.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-12-06-addressing>)

Author: Marek

Published: 2019-12-05T23:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Parameter](<https://devfeed.tech/topics/parameter.md>)

Tags: [linux](<https://devfeed.tech/tags/linux.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [socket](<https://devfeed.tech/tags/socket.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

A tutorial on socket addressing on Linux, covering AF_INET, AF_INET6, and AF_UNIX address families, socket address structures, and converting IPv4 and IPv6 addresses between text and binary forms. The supplied text is truncated before the IPv6 discussion is complete.

### Source excerpt

Addressing Articles from this series: - Creating sockets on Linux. - Addressing of AF_INET, AF_INET6 and AF_UNIX sockets. A freshly created socket isn't very useful. We have to tell it to either listen for incoming data, or connect to a remote peer. To achieve anything useful we need to perform a syscall dance, which involves either or or both. Among others, and syscalls take a socket address as a parameter. Before going into these syscalls we must discuss what exactly the address is.

## 即刻多端实时通信实践

DevFeed: [即刻多端实时通信实践](<https://devfeed.tech/articles/article-41012.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/socket-io/>)

Author: Joway

Published: 2018-09-18T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Socket.IO](<https://devfeed.tech/topics/socket-io.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [channel](<https://devfeed.tech/tags/channel.md>), [clients](<https://devfeed.tech/tags/clients.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [redis](<https://devfeed.tech/tags/redis.md>), [room](<https://devfeed.tech/tags/room.md>), [socket](<https://devfeed.tech/tags/socket.md>), [tech](<https://devfeed.tech/tags/tech.md>), [websocket](<https://devfeed.tech/tags/websocket.md>)

### AI overview

This Chinese technical article explains how Jike's jike-io real-time communication infrastructure is built with socket.io. It describes server-to-client WebSocket notifications, per-user rooms, HTTP requests for business operations, socket.io's fallback and reconnection behavior, and Redis-based distribution across nodes, including sticky load balancing and the associated message-broadcast overhead. It also discusses connection spikes and Node.js bottlenecks.

### Source excerpt

背景 jike-io 是即刻基于 socket.io 构建的一个实时通信基础设施。目前客户端上的所有实时通信服务都是建立在其基础上，涵盖了私信、消息通知、用户反馈、活动页小游戏等诸多组件。 在目前即刻的实时通信设计里，我们的实时通信只是为了让服务端主动推送消息给客户端，客户端不会主动通过 websocket 发送消息。由于几乎我们所有需要发送消息的请求都会有一定业务逻辑在，而这个业务逻辑我们并不希望 websocket 连接层(jike-io)去处理，所以我们仍旧采用传统 HTTP 请求的方式去发送请求。至于之后是否需要推送消息给用户，由服务端调用 jike-io 的接口进行实现。

## Using systemd to Run Python Scripts as Daemons

DevFeed: [Using systemd to Run Python Scripts as Daemons](<https://devfeed.tech/articles/the-joy-of-systemd-35471.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/the-joy-of-systemd/>)

Author: Graham King

Published: 2016-01-12T16:51:04Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [systemd](<https://devfeed.tech/topics/systemd.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Script](<https://devfeed.tech/topics/script.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [cgroups](<https://devfeed.tech/tags/cgroups.md>), [linux](<https://devfeed.tech/tags/linux.md>), [scripts](<https://devfeed.tech/tags/scripts.md>), [security](<https://devfeed.tech/tags/security.md>), [socket](<https://devfeed.tech/tags/socket.md>), [software](<https://devfeed.tech/tags/software.md>), [systemd](<https://devfeed.tech/tags/systemd.md>)

### AI overview

A tutorial on converting a Python script into a systemd daemon. It explains unit files, output buffering, logging, security features using cgroups, socket activation, and related systemd capabilities.

### Source excerpt

Embracing the future: A quick guide to systemd for modern daemon management.

## Raw sockets in Go: Link layer

DevFeed: [Raw sockets in Go: Link layer](<https://devfeed.tech/articles/raw-sockets-in-go-link-layer-35450.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/raw-sockets-in-go-link-layer/>)

Author: Graham King

Published: 2015-01-31T20:55:57Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Network](<https://devfeed.tech/topics/network.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [POSIX](<https://devfeed.tech/topics/posix.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [Internet](<https://devfeed.tech/topics/internet.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [go](<https://devfeed.tech/tags/go.md>), [headers](<https://devfeed.tech/tags/headers.md>), [http](<https://devfeed.tech/tags/http.md>), [ip](<https://devfeed.tech/tags/ip.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [linux](<https://devfeed.tech/tags/linux.md>), [network](<https://devfeed.tech/tags/network.md>), [network-programming](<https://devfeed.tech/tags/network-programming.md>), [posix](<https://devfeed.tech/tags/posix.md>), [programming](<https://devfeed.tech/tags/programming.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [raw](<https://devfeed.tech/tags/raw.md>), [socket](<https://devfeed.tech/tags/socket.md>), [software](<https://devfeed.tech/tags/software.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [udp](<https://devfeed.tech/tags/udp.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

A technical tutorial on using raw sockets in Go at the link layer. It explains receiving IP packets, inspecting and crafting IP headers, selecting address families and protocols, sending ICMP echo requests, and observing kernel responses. It also discusses Linux behavior and portability limitations for raw sockets.

### Source excerpt

Diving deep into raw sockets and IP headers with Go: A technical exploration.

## Bind before connect

DevFeed: [Bind before connect](<https://devfeed.tech/articles/bind-before-connect-38934.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2014-04-03-bind-before-connect>)

Author: Marek

Published: 2014-04-02T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [TCP/IP](<https://devfeed.tech/topics/tcp-ip.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [nat](<https://devfeed.tech/tags/nat.md>), [port](<https://devfeed.tech/tags/port.md>), [python](<https://devfeed.tech/tags/python.md>), [socket](<https://devfeed.tech/tags/socket.md>), [tcp-ip](<https://devfeed.tech/tags/tcp-ip.md>)

### AI overview

This article explains how the Linux kernel allocates source ports for TCP/IP connections, including ephemeral port selection, port reuse, connection limits, and the bind-before-connect technique.

### Source excerpt

Bind before connect A TCP/IP connection is identified by a four element tuple: {source IP, source port, destination IP, destination port}. To establish a TCP/IP connection only a destination IP and port number are needed, the operating system automatically selects source IP and port. This article explains how the Linux kernel does the source port allocation. Ephemeral port range To establish a connection BSD API requires two steps: first you need to create a socket, then call on it.

## Managing stale JavaScript and CSS assets with Discourse's message\_bus

DevFeed: [Managing stale JavaScript and CSS assets with Discourse's message\_bus](<https://devfeed.tech/articles/vintage-javascript-begone-41334.md>)

Original publisher: [Read original article](<https://samsaffron.com/archive/2014/01/15/vintage-javascript-begone>)

Author: Sam Saffron

Published: 2014-01-15T02:55:14Z

Content type: article

Language: en

Sources: [Sam Saffron](<https://devfeed.tech/sources/sam-saffron.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [realtime](<https://devfeed.tech/topics/realtime.md>), [Messaging](<https://devfeed.tech/topics/messaging.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Socket.IO](<https://devfeed.tech/topics/socket-io.md>), [Angular](<https://devfeed.tech/topics/angular.md>), [Meteor](<https://devfeed.tech/topics/meteor.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [json](<https://devfeed.tech/tags/json.md>), [messages](<https://devfeed.tech/tags/messages.md>), [rails](<https://devfeed.tech/tags/rails.md>), [realtime](<https://devfeed.tech/tags/realtime.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [socket](<https://devfeed.tech/tags/socket.md>)

### AI overview

The article explains how Discourse addresses stale JavaScript and CSS bundles in single-page applications. It presents the message_bus gem as a mechanism for realtime updates, then describes using an application-version digest and client-side route transitions to refresh assets when versions change.

### Source excerpt

The Problem These days all the cool kids are using Ember.JS or Angular or Meteor or some other single page web application. If you deploy often, like we do at Discourse, you have a problem. How can you get everyone to run the latest version of your JavaScript and CSS bundle? Since people do not reload full pages and just navigate around accumulating small json payloads there is a strong possibility people can be on old versions and experience weird and wonderful odd bugs. The message bus One BIG criticism I have heard of Rails and Django lately is the lack of "realtime" support. This is an issue we foresaw over a year ago at Discourse. Traditionally, people add more components to a Rails system to support "realtime" based notifications. Be it Ruby built systems like faye, non Ruby systems like Node.JS with socket.io or outsourced systems like Pusher. For Discourse none of these were an option. We could not afford to complicate the setup process or outsource this stuff to a third party. I built the message_bus gem to provide us with an engine for realtime updates: github.com GitHub - discourse/message_bus: A reliable and robust messaging bus for Ruby and... A reliable and robust messaging bus for Ruby and Rack At the core of it message_bus allows you a very simple API to publish and subscribe to messages on the client: # in ruby MessageBus.publish('/my_channel', 'hello') <!-- client side --> <script src="message-bus.js" type="text/javascript"></script> <script> MessageBus.subscribe('/my_channel', function(data){ alert(data); }); </script> Behind this trivial API hides a fairly huge amount of feature goodness: This thing scales really well, clients "pull" information from a reliable pub sub channel, minimal per-client house keeping. Built in security (send messages to user or groups only) Built on rack hijack and thin async, so we support passenger, thin, unicorn and puma. Uses long polling, with an event machine event loop, can easily service thousands of clients fro

## lsof: can't identify protocol

DevFeed: [lsof: can't identify protocol](<https://devfeed.tech/articles/lsof-can-t-identify-protocol-38917.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2012-12-09-lsof-cant-identify-protocol>)

Author: Marek

Published: 2012-12-08T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Library](<https://devfeed.tech/topics/library.md>), [debug](<https://devfeed.tech/topics/debug.md>)

Tags: [crash](<https://devfeed.tech/tags/crash.md>), [debug](<https://devfeed.tech/tags/debug.md>), [library](<https://devfeed.tech/tags/library.md>), [linux](<https://devfeed.tech/tags/linux.md>), [socket](<https://devfeed.tech/tags/socket.md>), [websockets](<https://devfeed.tech/tags/websockets.md>)

### AI overview

The article examines a SockJS-node issue in which enabling WebSockets appears to leak file descriptors and can lead to crashes. It reports that lsof handles the resulting half-closed sockets differently on FreeBSD and Linux, making the issue difficult to debug.

### Source excerpt

lsof: can't identify protocol SockJS-node users noticed that the server seems to be leaking file descriptors when websockets are enabled. The problem resulted in the usual crash. Additionally, was producing weird output, with line instead of a normal tcp/ip description. Where it should say something like: it said: The issue was hard to track, but eventually Yury Michurin found a culprit. It was a library which seems to be leaking sockets in state but didn't close them.

## Proxy socket.io and nginx on the same port, over SSL

DevFeed: [Proxy socket.io and nginx on the same port, over SSL](<https://devfeed.tech/articles/proxy-socket-io-and-nginx-on-the-same-port-over-ssl-35445.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/proxy-socket-io-and-nginx-on-the-same-port-over-ssl/>)

Author: Graham King

Published: 2011-12-22T22:32:26Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Socket.IO](<https://devfeed.tech/topics/socket-io.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [proxy](<https://devfeed.tech/topics/proxy.md>), [SSL](<https://devfeed.tech/topics/ssl.md>), [realtime](<https://devfeed.tech/topics/realtime.md>), [Web](<https://devfeed.tech/topics/web.md>), [Django](<https://devfeed.tech/topics/django.md>), [backends](<https://devfeed.tech/topics/backends.md>)

Tags: [django](<https://devfeed.tech/tags/django.md>), [haproxy](<https://devfeed.tech/tags/haproxy.md>), [http](<https://devfeed.tech/tags/http.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [realtime](<https://devfeed.tech/tags/realtime.md>), [server](<https://devfeed.tech/tags/server.md>), [socket](<https://devfeed.tech/tags/socket.md>), [software](<https://devfeed.tech/tags/software.md>), [ssl](<https://devfeed.tech/tags/ssl.md>)

### AI overview

A tutorial for running Socket.IO realtime traffic and a Django web application on the same SSL port. It uses stunnel to terminate SSL, HAProxy to route WebSocket traffic to Node.js and web traffic to nginx, and nginx with Gunicorn to serve the Django application.

### Source excerpt

Streamline your SSL setup: Realtime and web on one port.