跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

sockets.go

33 行 · 520 B历史下载
1// SPDX-FileCopyrightText: Copyright The Lima Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package sockets
5
6import (
7 "net"
8)
9
10type Kind = string
11
12const (
13 TCP Kind = "tcp"
14 TCP6 Kind = "tcp6"
15 UDP Kind = "udp"
16 UDP6 Kind = "udp6"
17 // TODO: "udplite", "udplite6".
18)
19
20type State = byte
21
22const (
23 TCPEstablished State = 0x1
24 TCPListen State = 0xA
25 UDPUnconnected State = 0x7
26)
27
28type Socket struct {
29 Kind Kind `json:"kind"`
30 IP net.IP `json:"ip"`
31 Port uint16 `json:"port"`
32 State State `json:"state"`
33}